The Mets nearly shut out the Orioles for the third straight day. Wilson Betemit hit a two-run homer in the eighth and Steve Pearce drew a bases-loaded walk in the ninth before Brian Roberts grounded out to end it.
Gee had been nicked only by pitcher Brian Matusz's single - his first big league hit - until Nick Johnson opened the eighth with an infield single and Betemit followed with a second-deck home run.
Silent for so long, the Orioles then threatened to go ahead. But with two on and two outs, Chris Davis hit a fly ball off Bobby Parnell that left fielder Scott Hairston caught against the wall.
Frank Francisco escaped a jam in the ninth for his 17th save in 20 chances, completing the combined six-hitter.
After R.A. Dickey pitched a one-hitter Monday night and Johan Santana teamed with a trio of relievers for another shutout Tuesday night, Gee (5-5) was in total command until late.
Gee struck out nine and walked two in 7 1-3 innings. No one on the Orioles had ever faced Gee, and it showed - he retired 13 straight batters, starting with J.J. Hardy's lineout with runners on first and second to end the third.
Gee also doubled and scored a run.
It was 94 degrees at gametime. There were heat advisories posted in the city all day, and the warm weather may have contributed to a record nine home runs flying out of the new Yankee Stadium in Atlanta's 10-5 win earlier in the afternoon.
But the ball wasn't carrying at Citi Field - at least not for the Orioles most of the game.
Baltimore's shutout streak reached 28 innings, its longest since a 29-inning drought in 2003, STATS LLC said. The Orioles totaled just 12 hits in the series while striking out 29 times. They dropped their sixth in a row to the Mets, dating to a 2010 series at Camden Yards.
Matusz (5-8) struggled again in interleague play, dropping to 0-7 in AL vs. NL matchups. He gave up three runs and seven hits in 4 2-3 innings.
Matusz did get his first hit, however, lining a two-out single up the middle in the third after starting his career 0 for 7 at the plate.
The Mets took a 1-0 lead in the fourth. Mike Nickeas got an RBI single on a sinking liner that Gold Glove center fielder Adam Jones reached in the right-center alley with a headlong dive, only to have the ball bounce out of his mitt.
Hairston hit an RBI double in the fifth and another run scored on Ike Davis' forceout, with Vinny Rottino making a hard takeout slide into second.
Gee and David Wright doubled in the sixth for a 4-0 lead.
NOTES: Wright extended his hitting streak to 11 games. ... Davis is in an 0-for-20 rut. ... The Orioles have been shut out three straight times just once, in 1957. ... Orioles OF Nick Markakis will get a checkup Friday in Baltimore on his broken right wrist. He had surgery June 1 and manager Buck Showalter said it's unlikely Markakis will play before July. ... Nickeas had a rough go on one pitch in the ninth. Betemit's foul ball hit him the mask and the backswing caught Nickeas on the arm.
Get Eyewitness News Delivered