Gold has always had value. The kingdom of Lydia in modern day Turkey was the first to mint gold coins around 700 BC. The weight, rarity and lustre of the metal has given it value in all cultures throughout human history. It is easily malleable, attractive and scarce, meaning it has always been sought after. In addition to this gold has many modern day scientific uses as it is an excellent conductor. Gold has historically kept its value. An ounce of gold would have bought you a fine toga in Roman times and would buy you a fine suit today.
Additionally gold has always been sought by banks as a reserve for the money they loan out. By holding gold, banks have something inherently valuable and which will retain value if the value of paper currency collapses.