CPI has gone up by a factor of 6 in the last 40 years. Gold prices have gone up by a factor of 10 in the last 40 years.
So gold has held it's value (and more) over the last 40 years, while the dollar is worth 80% less.
I picked 40 years, because that's the first chart I could find on google.
If you have data to the contrary, or over a different time span, I'd like to hear it.