Cleaves beta-linked terminal galactosyl residues from gangliosides, glycoproteins, and glycosaminoglycans. Hydrolysis of terminal non-reducing beta-D-galactose residues in beta-D-galactosides. Capable of effecting hydrolysis of lactose in situ in the gastrointestinal tract of lactase-deficient subjects when given as replacement therapy at mealtime. Belongs to the glycosyl hydrolase 35 family.