You may easily hit the 512city limit by playing on a modified huge map (e.g. 250*250 tiles, archipelago, 60% water), with just 10 opponents.
In general it hits you around 1600 AD. At that time, you should know a lot about the world, and large areas are just not settled, since no new towns can be founded.
Neverthelss, the AI still sends out settlers and troops, which you may spot from time to time on their endless journey.
Obviously, the 512city limit is hardcoded somewhere, so there is no chance to lift it upwards (at least not with built-in means).
Quite a silly decision, to have such a limit being fixed in the code. Especially, regarding the fact that computer power explodes from year to year.
At least, I would have expected that one could change it in the editor... but, no way.