The study suggests gold, platinum, palladium and related elements found in the crusts and mantles of Earth, the Moon and Mars arrived as part of impactors the size of small planets.Atoms are created from the fusion in stars, and when the really big ones inevitably explode via supernova, they scatter their atoms across the universe. Anything from hydrogen to the really heavy stuff like iron is thrown across the galaxy, and make up the contents of everything on our planets - including life itself.
But iron, for reasons spelled out in the article, ends up comprising the core of our planet Earth. Gold is about as heavy as iron, as opposed to carbon. So the scientists believe that the gold in on, or close to, the surface of our planet had to come pretty recently.
Check out the explanation here.