Technological advances can increase the gold supply. Asteroid mining, extracting it from sea water, mining lower quality deposits, etc.
There still has to be consensus on using gold as money, if there isn't it will lose its monetary premium to something that has better monetary properties.