My gas water heater pipes have corrosion at the copper to galvanized metal connection. Can it be fixed, and if so with what and how?
Are you sure that’s galvanized? Everything else (I know it dirty and hard to see) looks like black pipe. Which makes sense. But galvanized and gas is a huge no no. If it’s a water pipe, then turn off water heater and everything else and unthread that piece of pipe and get a new piece from a home improvement store.
Water is apparently leaking from the bottom fitting of the galvanized union and causing corrosion of the galvanized steel pipe. Remove the union, clean the threads , apply pipe dope ( I prefer teflon tape) and reassemble tightly to prevent future leaks. The rusted pipe could be wire brushed clean and will not rust if kept dry.