For thousands of years, gold has been used as money and often substitutes for currency and having some traits of a commodity, so investing in gold is often analogous to investing in cash.
To clear things up a bit lets take a look at a few points.
There are two ways to store gold in banks, one is Allocated Gold and Unallocated gold, the latter being very similar to cash on deposit. So let us compare Allocated Gold, which is what usually comes to mind when one things of gold in banks, the gold that are not in circulation and cash on deposit.
Allocated gold, unlike cash does not earn interest, but keeping unallocated gold in banks does not have the same risk cash on deposit entails such as the banks credit worthiness and decision making in lending your cash to 3rd party 10 times or more over than what the banks actual deposits. Though taking this earns you interest, unlike Allocated gold, you cannot just walk up to your bank and demand for your cash, and if all of the banks depositors one day decided to demand for their money, there will not be enough cash to pay the people.
Gold is mined and not printed, a country cannot just produce gold out of ink, paper, or electronic money, saturate the country with more than what is needed and paper money loses its value in terms of goods and services you can pay them with. Being gold, as an accepted form of payment, you can expect your gold to worth pretty much the same in any country.
Gold is subject to price risk, but so is cash. But Gold is more secure and are given exact identification numbers, records of manufacturer, purity and bar number, segregated in the vault and can be insured unlike cash wherein you have to rely on the banks accounting records for details of your account with cash that are no different from the others.
In short, Gold is better than Cash.