Gold is made in space. The source of the Gold near surface is deep inside the Earth and got there when the Earth was formed. It comes to the surface crust as Hogtown has suggested. The motherload source is well beyond the reach of any current drilling technology and likely that of any future technology.
Below is a description of how Gold is formed. Excerpts from Wikipedia.
Gold's atomic number of 79 makes it one of the higher atomic number elements which occur naturally. Like all elements with atomic numbers larger than iron, gold is thought to have been formed from a supernova nucleosynthesis process. Their explosions scattered metal-containing dusts (including heavy elementslike gold) into the region of space in which they later condensed into our solar system and the Earth.
Supernova nucleosynthesis is the production of new chemical elements inside supernovae.
A supernova is a massive explosion of a star that occurs under two principal scenarios. The first is that a white dwarf star undergoes a nuclear based explosion after it reaches its Chandrasekhar limitfrom absorbing mass from a neighboring star (usually a red giant). The second, and more common, cause is when a massive star, usually a red giant, reaches Nickel-56 in its nuclear fusion (or burning) processes. This isotope undergoes radioactive decay into Iron-56, which has one of the highest binding energies of all of the isotopes, and is the last element that can be produced by nuclear fusion,exothermically. All nuclear fusion reactions from here on are endothermic and so the star loses energy. The star's gravity then pulls its outer layers rapidly inward. The star collapses very quickly, and then explodes.
I love science!