Galvanized metal has a thin coating of zinc on the outside to prevent corrosion. Galvanized Yankees were covered in a thin "coat of blue"--hence the term.
Terry Foenander, a diligent researcher, who often posts on this message board, has coined the term "Galvanized Tars" to describe former Confederates who joined the U.S. Navy.