Hey CJR,
My rudimentary understanding of astronomy led me to believe that gold, a relatively heavy element, was formed by high energy explosions (supernovae or neutron star collisions) in the vicinity of our galaxy thus providing a source of these materials during the formation of the earth.
Best,
Scott