Sorry, I wrote 'So the real concern is about global population vs global gold stocks.', but I never addressed that.
So for your first question: there was lots of global population increase during the time when many countries where on a gold standard. We can have a look at how they dealt with it.
Basically, in the long run you can dig gold out of the ground. If gold prices get too high, more mines will become profitable, so people mine more. If gold prices drop, fewer gold will be mined.
Empirically in the long run the price of gold compared to eg the price of labour had been really rather stable in the past.
It helps that the global population and the global stock of gold typically change much slower than individual countries'.
> What happens if you live in a country where you can't just dig it up and people are poor.
Almost by definition a poor country has less economic activity. So they would need less gold.
Instead of me writing a lot of hypotheticals here, have a look at how 'dollarisation' works in the real world. That's when countries abandon their own currency (either officially or de facto) and run their economy on eg the USD or the Euro or so.
See https://en.wikipedia.org/wiki/Currency_substitution
That happens mostly with poor countries, and just like they can't dig up gold in our example, they can't print new USD either. They have to get their hands on them via exporting more than they are importing. (Or in the short run they can also take out loans; but those need to be serviced eventually.)