From the Super Mario Wiki
A Gold Bar in Luigi's Mansion
Gold Bars are items first seen in Luigi's Mansion. They account for 100,000G each and are often found in Treasure Chests.
Bars also are used for storing money in Paper Mario: The Thousand-Year Door and Super Paper Mario. Mario cannot use them in combat in any way, and he can only sell them for coins. If Mario buys 100 items at a store, he can get a Gold Bar for free. If he buys 300 items, he can get a Gold Bar ×3. In The Thousand-Year Door, the Deepdown Depot sells Gold Bars. Single Gold Bars go for 110 coins each, whereas a Gold Bar ×3 costs 350 coins, 20 more coins than they would actually be worth. Gold Bars initially appear to have no effect but, in a way, they allow Mario to carry more Coins. Gold Bars can be sold back to any shop for 100 coins, and Gold Bars ×3 can be sold back for 300 coins. This ensures Mario a supply of Coins if and when he should need it.
In Super Paper Mario, Mario can give a Golden Leaf to Saffron to turn it into a Gold Bar, and a Gold Bar into a Golden Meal, a useless item worth 65 coins (as opposed to the Gold Bar, which is worth up to 125 coins). Doing the former of the two can be a very good way to get some quick coins because the player can find Golden Leaves free.
Gold bars return in the game Luigi's Mansion: Dark Moon, where they take the same role as they did in Luigi's Mansion. However, they are only worth 20G instead of 100,000G.