Involved in the regulation of homocysteine metabolism. Converts betaine and homocysteine to dimethylglycine and methionine, respectively. This reaction is also required for the irreversible oxidation of choline. {ECO:0000269|PubMed:10529246, ECO:0000269|PubMed:8798461, ECO:0000269|PubMed:9681996}. This is the function of BHMT (betaine--homocysteine S-methyltransferase, Ensembl gene identifier ENSG00000145692).