Cleaves beta-linked terminal galactosyl residues from gangliosides, glycoproteins, and glycosaminoglycans. Hydrolysis of terminal non-reducing beta-D-galactose residues in beta-D-galactosides. kcat is 214.9 sec(-1). Mutants of this enzyme have improved transgalactosylation activity and can be used for galacto-oligosaccharides (GOS) production in vitro. Belongs to the glycosyl hydrolase 35 family.