You're likely thinking of Superman and Kryptonite.
Superman is primarily weakened by Green Kryptonite. In some stories (e.g., Action Comics #252, Superman/Batman arcs), Gold Kryptonite permanently removes Kryptonian powers—but this is a variant of Kryptonite, not pure gold.
Pure gold itself is not a consistent weakness for any major hero. The "gold vulnerability" concept usually refers to Gold Kryptonite's effect on Superman.
So: Superman + Gold Kryptonite = power loss, but not gold metal itself.