Involved in the biosynthesis of the osmoprotectant glycine betaine. Catalyzes the irreversible oxidation of betaine aldehyde to the corresponding acid. betaine aldehyde + H2O + NAD(+) = glycine betaine + 2 H(+) + NADH Binds 2 potassium ions per subunit. Amine and polyamine biosynthesis; betaine biosynthesis via choline pathway; betaine from betaine aldehyde: step 1/1. Dimer of dimers. Belongs to the aldehyde dehydrogenase family.