Gold stocks own gold mines. Gold mines require energy resources to dig the stuff out of the ground. If gold price goes up 15%, but diesel goes up 30%, the mine's profit margin has just compressed.
In other words, gold stocks do not necessarily do well when there's rampant energy inflation...