Gold's scarcity, the fact that it does not corrode or tarnish, coupled with its malleability so that coins can easily be shaped and the way in which it has been prized in all civilisations, have made it eminently suitable as a form of money. The first coin containing gold was thought to have been struck in the eighth century BC and the first pure gold coin on the orders of King Croesus of Lydia footnote (in what is now Turkey) around 550BC.
Gold coins were then minted by other Mediterranean civilisations and often circulated far outside their countries of origin. Indeed Roman gold coins were used for long after the fall of Rome itself. During the Middle Ages in Europe gold and silver formed the basis of the currency systems although gold was too valuable for most day-to-day transactions.
Over the centuries specie money - made from metals where the value of the coin was essentially based on the value of the metal itself - was gradually superseded by specie-backed money (starting with bankers' bills of exchange in the Middle Ages and moving on to state issued token coinage or paper money in the 17th and 18th centuries). These were tokens that could (at least notionally) be exchanged for gold or silver on demand. Gold, silver or both together remained the basis of the monetary system. Generally speaking, silver was used for intra-national transactions while gold was used for inter-national transactions. Britain moved onto a de facto pure gold standard in 1717 - where the currency was linked to gold at a fixed rate - and onto a de jure standard in 1816 but most countries used a silver or bimetallic system until around 1870 when the newly emerging Germany moved onto a gold system.
The international gold standard only existed for a comparatively short period - from the 1870s to the outbreak of the First World War in 1914. Much has been written about it. Views on its success differ but there is broad academic agreement about certain points. It provided the backdrop to a period of fairly steadily rising economic prosperity and of generally low and stable inflation. The system survived the shocks of the period well (until the major shock of the first world war). A crucial advantage of the gold standard was that by offering the near-certainty to foreign investors that the value of their investment was unlikely to be hurt by the depreciation of the recipient country's currency relative to their own, it facilitated large flows of international direct investment capital that helped to open up and develop much of the United States, Canada, Australia and other "emerging markets" of that day. Relative to the size of the world economy, these flows were as large or even larger than today's and they were far less volatile.
It was not perfect; there were inevitable lags in the reaction of mine output to price stimuli, there were shocks to the world supply of gold and fears that the exhaustion of gold stocks would eventually prove deflationary. But it helped to provide a natural balancing function, in adjusting disequilibria between countries and in holding long-term price levels generally stable.
Attempts to return to the gold standard after the First World War were badly mismanaged with a return to pre-War parities in certain countries, despite the intervening inflation, the use of lower parities in others and the blocking of needed adjustment mechanisms. The fixed dollar-gold parity of US$20.67/troy ounce, which had remained unchanged through the war years and after, was suspended in 1933 but in 1934 the dollar was re-fixed at a new parity of US$35/troy ounce.
After the Second World War, the core of the Bretton Woods international monetary system that was established was that the dollar should be pegged to gold at the $35/troy ounce parity while other currencies should be defined in terms of the dollar with fixed but adjustable pegs. The Bretton Woods system helped to form what was, at least for western countries, probably the most successful period of economic history. Growth was high, and inflation, while higher than in the classical gold standard period, was relatively low and stable. Many developing countries too made rapid progress during that era. However, as we have noted above, the $35/troy ounce fixed price became unrealistic over time, partly as a result of existing inflation and a surge in demand for gold as a result of the Vietnam War. The $35/troy ounce peg was replaced in 1968 by a two-tier system with a free private market, but with gold still exchanging hands officially at an official rate. When the United States finally abandoned the system in 1971, the last fixing price before the "gold window" was closed was $42.22/troy ounce, and to this day the United States officially values its gold holdings at that price.