I would naively assume that when the earth was formed and still molten, all the heavy stuff such as gold would have sunk to the centre, so almost nothing would remain in the earth's crust where humans could access it. Is it that "almost nothing" is not nothing? Or was it added to the surface by later impact events as suggested on Wikipedia?
The answers to Why is there Uranium in Earth's Crust? and Why is uranium only in the crust, really? seem to be that uranium chemistry is such that it was carried along with lighter elements to the surface, but isn't gold chemistry much less favourable for such processes? Is this why gold is 500 times less common than uranium in the earth's crust?