Catalyzes the interconversion of UDP-D-glucuronic acid (UDP-GlcA) and UDP-D-galacturonic acid (UDP-GalA). UDP-alpha-D-glucuronate = UDP-alpha-D-galacturonate Belongs to the NAD(P)-dependent epimerase/dehydratase family.