As Gandalf says, Frodo’s small fire would not have harmed the ring whatever it was. Gold melts at over 1000 degrees centigrade, well beyond the heat of an ordinary domestic fire. People must have frequently used ore-bearing rocks to encircle fires without ever seeing anything unusual.
It is believed that early humans discovered how to release gold, copper, and other metals from ores while firing pottery. They began doing this in the Neolithic, the New Stone Age. Lead, which melts at little over 300 degrees, may have been found first.
Gold, copper and an iron-nickel mix from rare meteorites had been known before that. So, someone somewhere may have used a stone prop or similar for pottery work and discovered the art of smelting.
It was not a straightforward process, nor safe. Early on, they learned that copper could be improved by mixing it with arsenic, which is semi-metallic and not very poisonous in its raw state. But it would cause long-term damage, and traces have been found in the hair of Otzi the Iceman, who had a copper axe.
People soon learned to stop using arsenic and used tin instead. The much later legends of lame smiths like Hephaestus / Vulcan may be a memory of this.
The written forms of those legends date from after the late discovery that much higher temperatures – beyond 1500 degrees – would produce the previously-rare metal iron in vast quantities. And contrary to the popular legend, this was probably not a breakthrough by the Hittites. It happened piecemeal. It took time to learn how to make iron weapons and tools that were better than the familiar bronze. The Egyptians were suspicious of iron, thinking it might carry curses.