When I gain a coin token through a gold mine on a mountain, through a famous person tile or through a "bank" tile, does that token remain on that square? If my opponent captures that square by beating me in a battle, do I lose the tokens I already gathered there?
Your question is a little bit confused. Coin tokens do not accumulate on map squares. Coin tokens are used only to track coins gained through technologies. Your economy dial tracks the total of coin tokens on your technologies, plus the current number of coins you control on the map. From p. 26 of the rulebook:
Coins that are lost because of your opponents' interference are indeed lost until/unless you recapture them:
By contrast, the coin tokens that you earn on your technology cards are yours forever: