I've heard that in 2007 Greece proper reached its highest population number, made me wonder what the population of Greece has been through the ages.
In particular I'm curious about what % of the world population was in Greece (or Greek) in the ancient world (let say 500 b.c.)
This is a very hard question to answer, because until modern times "Greece" has not had stable borders. Ancient Greece is simply a term used for the region containing Greek city states, Roman Greece was a province that did not contain all Greeks, and Anatolia actually had many Greeks too.
There are estimates - but they are only very rough, extrapolated estimates - for the population of mainland Greece and the extended Greek world in Josiah Ober's The Rise and Fall of Classical Greece (2015). He claims that Greece itself would have had around 2 million, and the whole Greek world around 3.5 million inhabitants around 500 BC.
How this relates to the estimated world population of the time I do not know; in any case, since Greece is actually one of the best attested regions at this time, and there are large areas for which we know next to nothing, such a number would be little better than a guess.