One of the benefits of investing in gold is that it protects against inflation. One cause of inflation is a rise in the money supply, which can be caused by money printing by the government. Money printing is very tempting for governments because it gives politicians more money to spend without actually increasing taxes. Even though printing money runs the risk of increasing prices, it's a more subtle way of raising revenue rather than directly taxing people. Printing money also devalues the currency, making exports more attractive.
Gold cannot be printed, so it is much more difficult for the supply of gold to increase. Gold can be mined from the ground, but obviously this is not as simple as printing money.
Some people suggest that real estate is a good investment that can keep up with inflation and has similar safe haven properties as gold. They argue that in times of hardship, you can grow food on your land. Furthermore, land cannot be printed. There is a finite supply.
It is true that you can grow food on land, but there being a finite supply is hardly helpful. The major problem with land is that governments have too much control over it. Physical gold is difficult to tax. It is almost pointless for government to tax gold because people tend to buy physical gold and trade among themselves, leaving no paper trail. Gold is portable and can be easily stored and hidden. Land, on the other hand, is not portable. It cannot be smuggled out of the country. You cannot hide it from the government. The result is massive taxation. The reason why banks are very happy to lend to home buyers is because they know that if they lend to you, they have you by the balls. You cannot run off to another country if you cannot pay your debt. The bank can easily sieze your land and sell it. Gold is different. If you borrow money from the bank to buy gold, you could easily run off to another country with the gold. Gold is freedom. Real estate is slavery.
If government were to slap a tax on gold, people would simply move it out of the country or just do informal transactions. If government were to slap a tax on land, people cannot do anything about it but to accept it. Just as government can print money, government can also print land. Not literally! For example, the government can control the amount of land released for residiential development by altering the urban growth boundary. If government wants to keep land prices higher to collect more land tax or land transfer duties, it can limit the supply of land. If government wants to help out property developers, it can increase the supply of land.
In an end-of-the-world scenario, when banks collapse and civilization as we know it is finished, land ownership will be worth nothing because the land you own is land you own thanks to a piece of paper enforced by the judiciary. If civilization breaks down, it is assumed that the judiciary has no power and hence your land is gone. Even though you may live on it, it's not really yours. Gold is different. Physical gold is held by you and hidden by you. Since you control it and since you own it by force or threat of force, then it is yours, regardless of what a Supreme Court judge says.