Adding to what others have already mentioned... Most of the gold will be from various collisions of external objects. The vast majority of the gold and other heavy elements are in Earth's core due to gravitational differentiation.
There is a volcano (in South America IIRC) that has unusually high gold content, but it is from the underground magma reservoir coming in contact with gold deposits. This is why space mining is a really big deal. The Earth is a resource poor gravity prison by comparison. The wealth in space is enormous compared to any differentiated body.
Gold is actually everywhere and relatively common, but only in very small quantities. Under the right conditions, the weight can help gold to concentrate and fall out of solution when that solution was once covering a very large area, dissolved the tiny bits of gold found all over a large area, and then pools into a low point over extremely long periods of time.