Gangue refers to substances that are extracted along with desired minerals or ores due to their close association, and are considered commercially worthless in mining.
During the mining process, the materials that are extracted are grouped into two categories - economic fraction, which is the desirable material that has a value, and uneconomic fraction, which is the gangue.
Gangue must be separated out after the extraction process. The removal of the gangue from the ore is called ore dressing, or concentration of the ore. It may then be dumped as tailings.
Mining companies take into consideration the costs that they will incur for separating the economic fraction from useless gangue, and only then decide if a mining operation will be economically viable.
These days even the tailings are closely examined, to look for new uses in old materials. For instance, arsenopyrite was once considered a useless gangue mineral and dumped. With research, it was discovered to contain arsenic that is widely used today in insecticides. Hence, arsenopyrite is now considered an economic fraction.