The slumping offense wasn't helped by an ineffective Zito, who lasted just 4 1/3 innings, giving up seven earned runs on six hits and three walks in the process.
Zito started off the game by getting two quick outs, getting Ruben Tejada to ground out and striking out Andres Torres. But walks to David Wright and Scott Hairston and a hit-by-pitch to Daniel Murphy loaded the bases before Jason Bay's two-run single. Melky Cabrera misplayed Ronny Cedeno's double later in the inning to allow Murphy and Bay to score.
"I had a couple quick outs, but those walks were the difference there," Zito said. "You can't really look at the hits after that, you have to look at the walks."
Zito's struggles to open games continued, as he has now allowed 20 runs (18 earned) in 21 first innings this season (7.71 ERA).
"My timing was off, so my command was erratic today," Zito said, adding that he felt off during his pre-game bullpen session. "At times it was there, but at times the ball was up in the speed, and I wasn't commanding my offspeed like I usually do."
Zito later gave up an RBI single to David Wright in the second inning, and he departed with one out in the fifth inning, after allowing a Murphy single to right that drove in Torres.
Shane Loux came on in relief, and the righty middle reliever gave up two earned runs in 2 1/3 innings after being activated from the disabled list on Wednesday.
The Giants got their sole run of the game in the fourth inning when Pence's sacrifice fly scored Cabrera, who had reached with his ninth triple of the season. Cabrera finished 3-for-4 and also had a ground-rule double to left in the first, leaving him just a home run shy of the cycle.
Mets starter Chris Young allowed one run on four hits in seven innings, striking out four batters and walking none.
"He has that deception with his height, and we weren't able to find many holes," Pence said. "We hit some balls hard, but you have to find some holes, too."
The Mets had entered the series having lost 14 of their last 17 games, and leave San Franisco with their first series win in a month.
"I don't think we were as bad as we played during that stretch," Young said. "A lot of teams go through it. San Francisco's going through it a little bit right now. You're never as bad as when you're at your worst, and you're never as good as when you're playing your best baseball."
Prior to losing seven of their last eight, the Giants had returned from the All-Star break by winning nine of 11 games. The 10-game homestand saw the Giants drop three of four to the Mets and get swept by the Dodgers after taking two of three against the Padres.
"We've been awful here this past week, and when you get in these funks they're not fun," Bochy said. "Unfortunately, you do go through them. How we press on through these tough times will determine our season."
With the Dodgers and Diamondbacks both idle on Thursday, the loss left the Giants up half a game on Los Angeles and two in front of Arizona in the National League West standings.
"We're fortunate to be in first place, but we need to start carrying ourselves like it and pick it up here," Bochy said. "It's going to take a couple hits on the road to get this thing going."