From the Super Mario Wiki
At Super Paper Mario, they can only be acquired by purchasing them at Notso's shop in Flopside for 500 coins. When used, a Gold Medal adds 10,000 Points to the player's score (30,000 if the Speed Flower or Slow Flower is used). Gold Medals are the equivalent of ten Star Medals, which cost 50 coins and add 1,000 Points to the player's score.
In Yoshi Topsy-Turvy, a Gold Medal (also known as a Gold Happiness Medal) is earned if Yoshi gets a better score than the required by the Spirits. A example of this, is that if Yoshi collect an amount of Coins much above the target set by the Spirit of Greed, he wins a Gold Medal. Additionally, the player gets better odds at winning the Bonus Chance!.