I've never had enough gold to do this in a city, but in an army there are some mechanics that likely apply to the city.
Your capacity is for resources and gold, but it works separately.
In your case you have 14k capacity for wood, food and stone, and currently have 5000 of them. And have room for another 9k.
Gold doesn't show up there, instead it is off to the right by itself. In your case you can only have 14k Gold. Any over that and you will start having a trickle discharge of it.
With my armies I usually have to hire mercenaries with the extra gold if I don't have enough carts so I don't lose it.
Again, these mechanics are for armies but I assume they work in cities as well.