I can attest to the economic and political reasons in the Untied States.
When I teach the history of monetary policy and macroeconomics, I tend to divide the Gold Standard into four eras: Gold Pre-Civil War, Gold during the Gilded Age and Progressive Era, Gold from WWI to 1933, and Gold from WWII to 1973. As you may already see from that timeline, the abolition of the Gold Standard in the US was not an overnight phenomenon, but rather something that slowly occurred over about 100 years.
First, let's establish what exactly the Gold Standard was, in the most basic possible terms: it was fundamentally a form of inflation control, and a metric to value one currency against another. From 1834 - 1933, the US Dollar's value was fixed at $20.67 per once of gold, and most other countries also had their currency's tied to a specific value of gold. What we can see immediately is that if there is a currency/price shock in one country, it will vibrate out into another country.
This is exactly what happens in the late 1840s to early 1850s. We have to remember that in this point in time, the US still technically has bimetallic currency between silver and gold, with silver currently pegged at 16:1 against gold. The gold rush in California and Australia causes an influx in the supply of gold, which caused the price of gold to decrease and the value of silver to increase (1). This, in combination with the Coinage Act of 1953 which lowered the amount of silver in US coins, started the phase out of silver from our currency.
We then have the Civil War, which completely changes the landscape again. During the war, we temporarily abandon the Gold Standard, and issued money that was not redeemable in gold or silver; this was because of high levels of inflation and the inability of the US government to pay its debts in gold and silver. Although we go back on the Gold Standard after the war, silver continues to take multiple hits. By 1857, most banks will no longer pay out in silver, and the Coinage Act of 1873 completely demonetizes silver. This is the principal era of the US Gold Standard. (1, 2)
Now the fun really begins. We have the rise of the Free Silver movement in response to the Panic of 1893. William Jennings Bryan and the Free Silver folks want America to return to a bimetallic system, which was very much not supported by President William McKinley. McKinley subsequently wins reelection in 1900, and the Gold Standard Act is passed, completely cementing gold and gold alone as the only exchangeable metal for the US Dollar.
The next major development is the creation of the Federal Reserve System in 1913. The Fed was originally meant to lower the risk and frequency of bank runs. They made it so smaller banks could borrow from the Fed to ensure they always had enough money on hand, and they established the Federal Reserve Note. FRDs were still exchangeable for gold at this point, and this basically had no direct effect on the Gold Standard itself (3, 4)
WWI shortly follows, and most of the world falls off the Gold Standard. But not the United States who, through the guidance of the Fed, remains on it throughout the whole war. By 1927, most countries are back on the Gold Standard. But despite all the Fed's efforts, Black Tuesday hits hard, and the Great Depression follows quickly after. But how could this have happened if the main purpose of the Fed was to ensure banks had sufficient liquid cash for their customers?
Most modern economists point at the Gold Standard itself as the culprit:
For the Fed to generate enough cash to meet the public’s changed demand for it, it would have had to create much more money and to lower interest rates. Lower interest rates, however, would have sped up the export of gold from the country as investors looked abroad for higher returns. Creating more paper money, moreover, would have created doubts about the ability of the United States to remain on gold. The greater these doubts, the greater the incentive to export gold, reducing gold reserves, and making it harder to maintain the dollar at its legal gold value. Hence, to keep the economy from collapsing, the Fed needed a policy of expansion. To stay on the gold standard, it needed one of contraction. Until 1933, it largely went with the latter (2)
And so, in 1933, FDR takes the US completely off the Gold Standard. We then have the Gold Reserve Act of 1934, which nationalized American gold and transferred it to the authority of the US Treasury. The ratio of USD to Gold is devalued from the longstanding $20.67/oz to $30/oz. The combination of these policies, alongside the New Deal and the production boom of WWII, were enough to bring the Untied States out of the depression and into the highs of the 1950s.
But this is not the full end of the story. The United States agreed in Breton Woods to reestablish a pseudo-Gold Standard, one in which the US offered an official exchange of dollars to gold at $35/oz - this was only available to countries and central banks, not to individuals or companies. This system remained in place until the early 1970s, when a combination of inflation shocks caused Nixon to completely abandon the Gold Standard for the final time. For a more detailed explanation of what was going on with the inflation rate under Nixon, you may enjoy one of my previous answers here.
I know that was probably a lot to read and take in, so if you have any additional questions please don't hesitate to ask!