You can exchange it for something that you can eat and you can exchange it for somebody to build a house for you, just like dollars. Unlike dollars, you can't produce it out of thin air.
You used to be able to exchange salt, seashells, large stones for all these. Try getting someone to build you a house for salt. Gold could be worth 1/10th of what it is worth today (purchase power) or it could be worth x10 in 10 years. It's purely a speculative play, people pay more because they think someone else will pay more tomorrow. That's all it is.