Galactosemia is primarily caused by mutations in the GALT gene, which encodes the enzyme galactose-1-phosphate uridylyltransferase. This enzyme is vital for the proper conversion of galactose to glucose. Mutations in this gene lead to deficient enzyme activity, resulting in the toxic buildup of galactose-1-phosphate and galactitol. Other genes, such as GALK1 and GALE, can also be involved in less common forms of the disorder.