Gold is undeniably a compelling leader in the "Hey, do you need an handy abstract representation of value?" market.
It is effectively impossible to counterfeit(all the metals that look kind of golden aren't nearly dense enough; Tungsten and DU have the density about right but are wrong in basically all other respects, nuclear synthesis isn't really counterfeiting but is uneconomic, it's tricky to alloy with something cheaper without being caught by even fairly primitive measurement of volume and weight; etc.), it's pretty scarce, it can be divided/combined/melted down/reshaped easily(unlike precious stones, say, where the value of two halves of a diamond is markedly lower than the value of the larger stone), people find it appealing, and so on.
The problem is just knowing what situations do, or don't, reward possessing a handy abstract representation of value. Too little civilization and you either can't find anyone willing to sell you stuff; or run into somebody who knows that the exchange rate between gold and iron is actually pretty favorable when the iron is of the right shape to stab the guy with the gold. Too much civilization and the fact that it's an inert, unproductive, comparatively cumbersome to transport/store/transact with lump of deadweight makes it a pain compared to whatever currency is being reasonably well managed at the time.
It's only in the intermediate situations, where you are developing a real market; but don't have anyone competent enough to produce worthwhile currency; or have a real market but a previously stable currency is on the rocks; where it really shines. Outside of that, it's just jewelry, anticorrosion coating, or a specific commodities position that might be useful under certain specific conditions as part of a larger portfolio.