As you have seen, gold is neither overpriced nor underpriced. It buys about what it should buy. Maybe a little less. Maybe a little more.
How do we know what gold "should" buy?
We don't, really. But gold is a natural thing. It is pulled from the earth by people, using the technology and resources available to them. As their productivity in other areas goes up, so does – generally – their ability to extract gold from the ground.
If GDP goes up 10%... the quantity of gold usually goes up about the same amount. If the economy goes into a decline, so does the gold mining industry... reducing the rate of growth of the gold supply.
For these reasons, the supply of gold is usually more or less in sync with the supplies of other goods and services. And the exchange rate between gold and other goods and services is usually stable.