To me, economics is ALL about purchasing power.
In other words, economics deals
primarily with energy transfers within the biosphere (and specifically with regard to our species, since we're the only ones who throw the term around

). We've all heard the term: "General standard of living increase" thrown out as a reason to like Capitalism for its efficiency. This is basically the same as: a greater ability of the system to support life. It takes A LOT of coordinated effort to feed 6+ billion people. Money is just a necessary way to carry the equivalent of 10 tons of grain MUCH more easily, since large-scale direct barter is not feasible. Money is not the primary exchange of economics.
Gold doesn't inflate appreciably. There's a certain amount in the ground, and a certain rate of discovery, but that's negligible. And we haven't found the philosopher's stone to convert all the lead yet!! [though if that ever happens, we'll find that the true base-commodity is energy itself].
So we could say that a 20.00 gold coin (1 troy ounce) of the early 20th century could purchase a nice suit (say an 850.00 suit by today's standards). [These numbers may not be quite right, but take them for sake of argument]. Well, today it seems that the same "20.00" gold coin (1 ounce) could purchase...a nice suit...valued at about: 850.00 by today's standard!!
So the purchasing power of the gold hasn't changed much, but the UNIT (dollar) of payment HAS!
This is inflation. By this argument, it is indeed much safer to hold onto the non-inflating general payment asset (gold), rather than the inflating general payment asset (paper dollar), as your purchasing power doesn't change much with the former, but decreases DRASTICALLY with the latter. So, it's not an investment in the conventional sense, but when the choice is between: retaining purchasing power over time, and losing purchasing power over time, the choice becomes a bit easier to make.
Now, I'm speaking in terms of "all other things being equal". But, that's not the case, since an economy based on a common medium of exchange (money-based economy), that is left mostly to the free market, will see a GENERAL increase in purchasing power (as mentioned above).
For example, the phrase: "the poor of today, fare better than the kings of yesteryear". This should now be amended to "the
middle class of today...." because of the harmful effects of inflation: the upward shift of concentration of wealth. But you get the idea.
Anyway, Gold is a great store of value... and a natural one to boot. Paper dollars: not so much. Especially with the recent increases in everything that is BAD about a fiat system.