If you make a fresh piece of gold and show it to the world, you are proving that you have done some known — or at least bounded — amount of work.
In gold’s case, that work is gas, electricity, and human labor. If someone shows up with gold that cost less to produce, the price goes down.