Even with frivolous non-monetary uses, gold will always have value. It will always maintain its status as a precious metal. Other factors also determine the price of gold, and they outweigh those used for non-monetary purposes.
Over time, there will also be new sources for gold. If we can't mine for gold here, we can wait for gold to come to us either as meteors crashing into the planet or as asteroids traveling near the planet.