The gold cap is enforced by the server, like most things that would actually be "fun" to hack, like stats, health, damage, spells etc.
In Wotlk the gold cap is the maximum a signed 32bit integer can hold (2^31-1 copper)
I believe the client itself doesn't have a gold cap since some macros exist/existed that could play with the scaling of currency or even override the UI output of gold
"/run COPPER_PER_SILVER = 1"
"/run function GetMoney()return <any number> end"
If the server you are on, accept screenshots as prove you could cheat them out of some gold, by just making it look like you have a certain amount of gold.