The Mets ended the Nationals' three-game winning streak and handed them only their second setback in 10 contests.
Both starting pitchers went 7 2/3 innings with Gee (10-9) allowing two runs on six hits with three strikeouts. Zimmermann (15-8) also allowed six hits, but he surrendered three runs.
The eventual winning score came in the top of the eighth when Andrew Brown's infield hit drove in Daniel Murphy to give the Mets a 3-1 lead. Ike Davis supplied the rest of the New York offense with a two-run homer in the fourth.
Wilson Ramos produced a solo homer for the Nationals in the third and Stephen Lombardozzi hit another in the eighth to bring Washington within one.
LaTroy Hawkins prevented a Washington comeback by working a perfect ninth for his sixth save.
Swim Week Miami Beach 2014 [PHOTOS]