It comes from the gold slider, which converts a percentage of your commerce (the large orange coin-like thingy) into gold (the two piles of money). But it also comes from many other sources, such as Great People, shrines, wonders (Spiral Minaret) and specialists (Merchants).
Certain buildings such as Market, Grocer and Bank gives you a percentage increase to the gold generated by commerce in a specific city.
Example: You are running the gold slider at 60% and a city is making 50 commerce. This leads to 30 gpt. The buildings will then increase this 30 gpt by a certain percentage (e.g. 25% for market, if I remember correctly).
If you run out of gold the game will automatically increase the amount of commerce being converted into gold. If youre already running at 100% gold then your units go on strike.
In case your running out of gold and going on strike, you can build and run cottages to increase your commerce. This will lead to increased gpt and science (just run your sliders). This is perhaps the most direct way.
Civ IV has a very steep "gold per turn" cost in the form of city-maintenance compared to older Civs, so by limiting the amount of cities you build earlier on in the game you'll have more effective gpt.