Galactosemia is diagnosed through newborn screening and confirmed by measuring galactose-1-phosphate uridyltransferase activity. The primary treatment is a galactose-free diet, which involves eliminating lactose-containing foods to prevent liver damage and other complications.