Gold is valuable because people buy it. People don't buy it because of some hypothetical amount of energy that went into producing it, they buy it mostly because it's shiny and rare (and sometimes because it doesn't corrode much or conducts well).
The energy cost to produce is relevant to its price only in so far as it feeds into the supply / demand equation.