From the Super Mario Wiki
The Gold Gearmo is a minor character in the game Super Mario Galaxy 2. It is a golden coloured Gearmo, who sends a letter to Mario asking for help in the Boulder Bowl Galaxy. This letter opens up the mission "C'mere, Goomba". It appears on the Boulder Planet and Mario has to go talk to it. When Mario speaks with it, it tells him that it loves Goombas and requests that Mario needs to go and find one. It then makes four pillars appear which Mario has to get the Goomba to come in between. They can also be broken open for Star Bits.
Once Mario finds and lures a Goomba into the square, the Gearmo will become very happy, exclaim its delight for the captured Goomba, and thank the player with a Power Star. After the mission, the Gold Gearmo can be found on Starship Mario, and will share a 1-Up Mushroom with Mario as thanks for helping it. For the rest of the game, it can be found having tea with the similar Silver Gearmo, who collects Topmen.