The Universal Suffrage civic allows you to spend gold to finish production in cities.
You spend X% of your per-turn gold income on research, culture, espionage. and the rest is gold. Default is 100% research, but if you have 0 gold and negative gold per turn (GPT) the game automatically changes it down so that you aren't losing money. You can change it with

THIS^^^ +/- button. Sorry if it's fuzzy, it's in the upper right corner of the screen.
if you have a large gold stockpile, you can afford to not take money out of your research for longer.
You spend X% of your per-turn gold income on research, culture, espionage. and the rest is gold. Default is 100% research, but if you have 0 gold and negative gold per turn (GPT) the game automatically changes it down so that you aren't losing money. You can change it with

THIS^^^ +/- button. Sorry if it's fuzzy, it's in the upper right corner of the screen.
if you have a large gold stockpile, you can afford to not take money out of your research for longer.