People say gold holds its value when prices in the shops rise. Sometimes the gold price has risen in those periods. Sometimes it has not, for years at a time. A story that only keeps the favourable decades is not an explanation.
Inflation is a basket
A consumer-price index measures a basket of goods in one currency. Gold is one commodity, usually quoted in dollars, and then converted. The basket and the metal can diverge because they are not the same thing. A rise in the gold price in dollars can be a fall in another currency, or the other way around.
Other things are moving too
Real interest rates, the dollar, jewellery demand and reserve buying can dominate a period in which inflation is the headline. Attributing the whole move to inflation is a narrative, not a measurement. This article does not offer a correlation, a back-test or a recommended holding period. Those would pretend to a result we have not established.
What you can check
If you care about inflation, read the index that matches the currency you spend, from the statistics office that publishes it. If you care about gold, read a dated price and the label on it. GXLD will not describe gold as inflation protection, a stable store or a path to growth. What can move the price of gold? lists the kinds of pressure that actually show up in the market, without ranking them into a forecast.



