You will need 2 variables : currentDisplayedGold and currentGold
When you give gold to the player, set currentGold to currentGold + newGold, and call a function "displayGold"
This function will just check if the currentDisplayedGold is < to currentGold, then add 1 to display (and update the display itself ^^), wait 0.05s, and call the same function again.
Here is the capx doing so : capx