Why did countries get off the gold standard?

Gold standard means that the currency that is printed cannot exceed the gold reserves of the country. Since the supply of gold is limited to the amount that can be mined, the government cannot print money on their own discretion. This prevents Central Banks to provide stimulus to the economy in downturns and the economy can get into a downward deflationary spiral.

This is what happened during the Great Depression. At that time when the economy started heading downwards; the central bank increased interest rates. This was done to prevent people from demanding gold and to increase the value of the dollar.

Compare this to the current situation where the Fed and other central banks around the world are reducing interest rates to stimulate demand in the economy. This can be done because money can be printed and used to pump liquidity in the economy. If this liquidity is not present then the economy will see a downward deflationary spiral, much like the depression.

Most proponents of the gold standard are in its favor because it limits the ability of the government to print money at their discretion and cause inflation.

However on balance, having a gold standard is much worse than not being on a gold standard. In any case, there is very little chance of going back to the gold standard because the currency in circulation around the world today is much more than the available stock of gold.