The story
In the sense of high and enduring value, with literal origins in trade (currency exchange and barter), where any given currency or commodity may be worth as much as gold or hyperbolically described as such.
Etymology from Wiktionary, CC BY-SA 4.0.