Gee (6-7), who had been roughed up for eight runs over 14 innings in his previous two outings, stymied the Cubs on seven hits, didn't allow a walk and struck out four.
Bobby Parnell earned his second save with a scoreless ninth for the Mets, who evened their three-game series at Citi Field.
Jordany Valdespin went 2-for-3 with a solo homer and Ike Davis added a two-run shot to account for New York's scoring.
Chicago starter Jeff Samardzija (6-8) was touched for three runs on seven hits over seven full frames.
David DeJesus notched the only RBI for the Cubs.
Swim Week Miami Beach 2014 [PHOTOS]