Gold deposition in quartz veins is associated with hydrothermal activity. Super-saturated, very hot liquids as a result of volcanic activity, carry gold in them. Quartz and these fluids have a tendency to precipitate at the same time because they do so at similar temperatures. Veins are also a result of fluids injecting themselves into weaknesses in the bedrock-- these weakness are exploited by the fluids and as the fluids get to very quickly decompress they solidify as veins (aka, they were only liquid because they were under such extreme pressure underground). Thus, gold is deposited in quartz veins.
There are some studies done of the use of remote sensing to detect gold but I do not know much about it. Many of the gold mines we know of are a result of seeing gold in rivers (placer deposits) and looking specifically, in an area's geologic history, for volcanic activity and hydrothermal alteration.