Gold and fiat currency are both means of exchange and are therefore money. People hold gold to hedge against risk because gold is money. Banks hold gold TRADITIONALLY because traditionally (several thousand years worth) GOLD IS MONEY.
Good money must have seven characteristics (from Richard Russell)
(1) It must be durable, which is why we don't use wheat or corn or rice.
(2) It must be divisible, which is why we don't use art work.
(3) It must be convenient, which is why we don't use lead or copper.
(4) It must be consistent, which is why we don't use real estate.
(5) It must possess value in itself, which is why we don't use paper.
(6) It must be limited in the quantity that is available, which is why we don't use aluminum or iron.
(7) It should have a long history of acceptance, which is why we don't use molybdenum or rhodium.
Only gold fits all seven characteristics.
The liquidity of gold and fiat currency are not equal.