Gee (7-7) yielded five hits and a walk while striking out two in the efficient outing, tossing 69-of-105 pitches for strikes.
Bobby Parnell wrapped up the victory with his 17th save as the Mets salvaged one win in their three-game series.
Byrd's ground-rule double with one out in the first sent home Eric Young and David Wright for a quick 2-0 lead. He later came home on John Buck's single, giving New York all the offense it would need.
Pittsburgh's Gerrit Cole (4-3) absorbed the loss, surrendering three runs on six hits over five full frames.
Starlin Marte and Jose Tabata each drove in a run for the Bucs, who came into the contest tied with St. Louis for the National League Central lead.