D-Galactose:NAD (P)+ 1-oxidoreductases. Catalyzes the oxidation of D-galactose in the presence of NAD+ or NADP+ to D-galactono-gamma-lactone and NADH or NADPH. Includes EC 1.1.1.48 and EC 1.1.1.120.