Though once considered very valuable, by the 23rd century the Federation considered it almost worthless, except for decorative and functional purposes. (TOS: "Catspaw"; TNG: "The Last Outpost", "Time's Arrow"; VOY: "Muse") Items covered in gold were said to be gilded. (TOS: "I, Mudd")
Fort Knox on Earth was the largest repository of gold bullion in Earth's history. With the transition to the New World Economy during the late 22nd century, money became obsolete and Fort Knox was turned into a museum. Around 2365, two Ferengi made a failed attempt to break into the vault. (VOY: "Dark Frontier")
In 2368, Par Lenor offered 20,000 Ludugial gold coins for the empathic metamorph Kamala to Ambassador Briam. The offer was refused. According to Par Lenor, Ludugial gold was the purest in the galaxy. (TNG: "The Perfect Mate")
The Ferengi valued gold as a precious commodity until the 2370s, after which its use to them consisted of little more than a medium for suspending latinum in. It still remained valuable to some primitive civilizations. (DS9: "Little Green Men", "Who Mourns for Morn?"; ENT: "Acquisition"; TNG: "The Last Outpost", "Captain's Holiday", "Rascals")
Dialogue in TNG: "The Last Outpost" and "The Perfect Mate" suggested that, at least as late as 2368, Ferengi considered gold valuable. In "Little Green Men", Quark says to a 20th-century Human that "gold is good" while discussing what humans could trade for advanced Ferengi technology. However, by the time of "Who Mourns for Morn?", Quark described gold as "worthless", at least in comparative terms to latinum.