The 32-year-old Doumit could share time with Evan Gattis, a rookie last season who is McCann's projected replacement as Atlanta's primary starter.
Doumit played his first seven seasons with Pittsburgh, then spent two years in Minnesota. He hit .247 with 14 homers and 55 RBIs this year, when he started only 43 games at catcher and also played in the outfield.
Gilmartin, the 28th overall pick in the 2011 amateur draft, was 3-8 with a 5.74 ERA at Triple-A Gwinnett last season.
The trade was announced Wednesday.