Gold being trusted by humanity as a value holder for many reasons and even the toughest law wouldn't change it. Somehow gold outlast most governments, dynasties, even religions.A little bit of history: When FDR took office in 1933 papers dollars were required to be 40% backed by gold in the treasury. Also at that time, people were hanging onto $20 gold pieces as an honest way to save and be prepared for emergencies. FDR wanted to expand the money supply but had hit the limit based on the amount of gold held by the government. The government decided people were unreasonably hoarding gold.
The problem (for FDR) was solved by signing an executive order* making holding gold in excess of $100 value, or 5 ounces, illegal. There were long lines at the banks because you had to turn your gold in by May 1, 1933 to avoid persecution. You got $ 20.67 per ounce of gold surrendered. Now more money could be printed.
In 1934, Congress went a stop farther and raised the official price of gold to $ 35 per ounce. This meant, under the 40% law, even more dollars could be printed. This also overvalued gold in relation to the dollar and made gold mining quite profitable. People made a good living mining gold during the Depression until gold mining was outlawed in 1942 to get miners to concentrate on strategic metals.
*The executive order signed by FDR was not legal or lawful, but that was corrected when Congress passed the Gold Reserve Act of 1934.
There are a few properties that gold outlast sea shells and salt, as well as silvers and platinums:
1) It is corrosion resistant and doesn't deteriorate over time and weathered away (salt and sea shells can't do that)
2) It is light weight so you don't need much space to store them and can carry them around to trade
3) It does not take a lot of energy to shape it divide it and melt from jewelry back to coins and back to jewelry
4) It is easier than other precious metal and gemstones to identify (no grading, no special equipment needed to identify for the experienced, just look at it and you will see it between real deal and fake one)
5) Even civilization evolved differently all over the world somehow worship gold
6) A more modern one: you cannot artificially create a non radioactive gold from another element affordably. You can create more salt and create more sea shells if you want, or transport them to increase supply, but not gold.
This make it a really good reference other currency should be correlate to assuming human population and GDP stays stable over time. The biggest problem with gold standard as currency is people may end up holding gold instead of creating new value from productivity and that discourage real growth in society.