Gold's atomic number of 79 makes it one of the higher atomic number elements that occur naturally in the universe. It is thought to have been produced in supernova nucleosynthesis and from the collision of neutron stars and to have been present in the dust from which the Solar System formed.
Because the Earth was molten when it was just formed, almost all of the gold present in the early Earth probably sank into the planetary core. Therefore, most of the gold that is present today in the Earth's crust and mantle is thought to have been delivered to Earth later, by asteroid impacts during the Late Heavy Bombardment, about 4 billion years ago.