Money developed as a portable way of carrying a universally recognized store of value around, the value of various goods and services could be be pegged relative to to that universally recognized store of value. Without a universally recognized store of value, commerce between people and between businesses would be a cumbersome web of barter transactions. Gold and other coinage metals, as well as precious stones filled this role, due to their high value to weight ratio, and almost universal desirability.
When money was in gold or silver, as it was up through the early part of the 20th Century, a shortcut to wealth was to work to acquire gold and silver, rather than use one's labor to acquire other useful goods, such as a textile factory or a sawmill. While there is nothing wrong with gold, it does make pretty jewelry and has useful electrical properties, gold bars in themselves do not benefit their owners. Gold is and was a store of value, but someone had to toil and sweat to extract, refine, and cast the gold bars. The pursuit of gold or other coinage metals reduced the real wealth of the nations. If gold was not needed as a store of value, the labor used to extract, refine, and work the gold could have be used to do more useful things for the citizens of the nineteenth century, such as build more and better housing, farm implements, railways, and so on. Of course, value could be stored in other assets as well, such as oil, steel, or wheat, but oil, steel, and wheat moved up and down in value, and were anything but portable in anything larger than trivial amounts.
Paper money originally developed as a safer and more portable way to transport the value of gold. The value of the note was based on a fixed amount of gold, and conversely, the price of gold was fixed to a certain denomination of the note. Paper money, on the other hand, had the characteristic of being worth nothing in itself. If someone wanted to counterfeit the design on the notes and was skillful enough, he could profitably pass these notes off as the genuine article, and enrich himself. A dirty little secret about paper money though, was that as long as everyone refrained from cashing in their "gold notes" at once, the notes would stay in circulation and nobody would be none the wiser. The only effects would be that if enough of these notes were circulating, the price of goods would be bid up, as more notes chased the same amount of goods. Of course, more goods could be produced to meet the demand, enriching everyone.
This lesson, of course, was not lost on governments either, and not just in finding ways to discourage private counterfeiting. As populations swelled and technology made more goods available and people got rich, people wanted to store their wealth, not only to hoard it, but to make transactions possible in larger and larger denominations, particularly on the commercial level. This bid up the value of gold and other precious metals, which made it profitable to mine gold in quantities greater than was needed for goods actually made of gold. This was the driving force behind the gold rushes of the nineteenth century in America, and what drove wars of conquest worldwide throughout recorded history. All this effort did nothing to improve the lot of people overall, mining for gold sucked people off of farms and out of factories, where goods people could really use were produced, mining despoiled the land, and war has some obvious costs of its own. At the same time, if gold appreciated in value, it became an attractive asset in itself, rather than just a store in value. A wealthy investor might just decide to keep his capital locked up in gold, or in mining gold, rather than venture it importing goods or building a factory. In a growing economy, flooding the market with gold notes quenched the appetitite for people to have a store of value that they could reasonably count on, at least in the short run. This strategy had to be carefully implemented but it worked well to provide liquidity to a growing economy, but left the government treasury vulnerable to a run on gold during the inevitable financial panics. Panics were a regular feature of the nineteenth and early 20th century, and hyperinflation during and in the aftermath of war prompted people to abandon paper money.
In the early years of the Great Depression, money flowed out of business and industry, ironicly into paper money. Money wasn't depreciating, but rather the value of goods relative to money, which in some way was still linked to the value of gold. A somewhat futile strategy was to make it illegal to hoard gold to force economic activity into more useful activities, but it wasn't until 1973 when the gold standard was abandoned. Gold still looms as a "shadow" currency over the economy, but its role in recent years has lessened, and its price is more subject to supply and demand for gold more for its industrial and ornamental uses. The most recent large scale move of money into gold was in 1979 when the price of gold ran up threefold during the near hyperinflation years of the late 70's. When the recovery came a few years later and inflation was stabilized, all of those goldbugs looked pretty silly when the price of gold collapsed to pre runup levels.
While the gold market has been pretty much a yawn for the last 20 years in America, don't count it out completely as a viable alternative to paper money. Paper currency is only as good as the government that issues it. Witness the hyperinflation in recent years in the developing world. The world is a dangerous place, and a widespread disaster in the financial system in the developed world could stir the goldbug's lust once more. When the fertilizer hits the fan and revolution is in the air, people desire a universally recognized, but portable way of carrying wealth.