Involved in the metabolism of galactose. Catalyzes the conversion of UDP-galactose (UDP-Gal) to UDP-glucose (UDP-Glc) through a mechanism involving the transient reduction of NAD (Probable). UDP-alpha-D-glucose = UDP-alpha-D-galactose Carbohydrate metabolism; galactose metabolism. Homodimer. Belongs to the NAD(P)-dependent epimerase/dehydratase family.