I don't know much about gold mining specifically, but I know the way some ores are separated is by crushing rock and essentially sifting off the metal, leaving behind coarse sand that still contains some metal. Processing beyond that is harder, so mining companies do the math on the price of the metal to determine if it's worth it. Often the technology or price changes later on, so previous tailings become economically recoverable.
The most common way I know they recover gold is with cyanide. I'm pretty sure it can be done safely, but plenty of places have banned it for the danger. I'm not sure if I'd trust these companies to do this further recovery with better environmental and human health considerations.