In Legend of Dungeon, gold represents your score. Keep in mind that you need to get the final treasure in addition to as much money as you can in order to get into the top of the highscore!.
There are 3 types of gold: Coin (1g), Big Coin (10g) and blue Gem (100g).
Certain boss monsters drop large amounts of gold when slain.
It appears that the amount of gold in the dungeon does not increase when playing in Co-op, So it can be wise to let one of the players get all the gold. This way when you reach a shop you'll have a better chance of using it.