Gold has value because it's shiny, doesn't oxidize, is malleable enough to easily form conspicuous jewelry, is much rarer than base mining elements, and is not cheap to extract.
The not oxidizing and rarity are key. E.g. platinum is also not cheap.
Aluminium is close but it's orders of magnitude more common, and still oxidizes a little.