It doesn't have to be gold. Any commodity would do the trick. The main point is that money should represent the ownership of some (physical) commodity. Your paper money notes and the number on your electronic bank account should be a storage receipts. They should mean that some bank stores some (physical) commodity which you are entitled to go and check out whenever you want.
This way, it is impossible to create money, unless one creates that (physical) commodity, which can only be made at market prices. Hence inflation is virtually eliminated. And to borrow money, one has to compensate the one lending it by offering a competitive interest rate. Hence a market interest rate would come into existence again. Borrowing would be demand for money, lending would be the supply of money and the interest rate would be the price of money which creates market where that demand and supply meet. The boom-bust-cycle we suffer from today, is caused by the "credit expansion" of the banking system. Whenever money is borrowed, banks create new money. There is no need to convince anone to lend his existing money. Thus the interest rate does not increase in reaction to increased borrowing. The interest rate we have today does not reflect an equilibrium between borrowing and lending, it is just a figure made up by banking beaurocrats. Any valuation, investment calculation or consumtion plan based on the so called interest rate of today, are simple flawed! It is the destruction of the market interest rate which causes the boom-bust-cycle.
Today when someone borrows money, they are not lend by anyone, but they are created out of thin air, which causes inflation and so results in taking value from everyone holding the currency without their consent. In a way, money today doesn't represent ownership, but au contraire, HOLDING MONEY TODAY IS LIKE BEING INDEBT: money is created as debts by the banks, and holding money means loosing value to inflation, just as if one pays interest rate on a debt!!!
Historically gold has had advantages in being easy to divide, easy to recognize, easy to lock up or hide, easy to transport, being chemically indestructable and so on. Today, those advantages might be of lesser importance because of the technical developments, but it remains a formabdle "brand" in the minds of people and hence a natural standard. I'd say that we should let people in the marketplace decide what they want to use as money.