The Giants (41-21), who have a 9 ½-game lead over the Dodgers in the National League West, recorded their eighth victory when trailing after six innings and their fifth when trailing after seven. Both are NL highs.
"That just tells you about what kind of team we have," Morse said. "We find a way. We've been doing it all year. We've been fighting to the last out. ... We don't give up. We truly think that no matter what the score is, we're going to find a way to win."
Trailing, 4-3, the Giants began their ninth-inning surge in unlikely fashion. Pagan, whose two-run single in the sixth inning eroded most of New York's three-run lead, struck out on a 1-2 pitch from Mets closer Jenrry Mejia (4-3). But the third strike skipped in the dirt and eluded catcher Anthony Recker. Pagan sped to first base and was safe as Recker's wide throw pulled Lucas Duda off the bag, though the Mets unsuccessfully contested the call.
"You have to take advantage of those kind of mistakes," Pagan said. "Sometimes you don't need a hit to win. [Mejia] threw a very nasty pitch. It got away. As they say, speed kills."
Manager Bruce Bochy praised Pagan's effort.
"You strike out, sometimes you have a tendency to get frustrated and not get down the line, but he busted his tail down the line to beat the throw," Bochy said. "That's where it all started. ... It's how you play the game. You play it right, good things happen. Hustling down the line, you can't take for granted that the throw is going to be right there, and Angel did a great job of that."
Morse admitted that he might have sulked instead of sprinting.
"I strike out like that, I'm upset with myself," he said. "But [Pagan] hustled right out of the box and got on base, which was the big turning point in the game."
Pagan scored on Pence's third hit of the night, a double into the left-field corner that increased the volume of the AT&T Park crowd to postseason level. Buster Posey's deep fly advanced Pence to third -- another example of successfully aggressive baserunning -- and prompted an intentional walk to Pablo Sandoval, which set up a potential inning-ending double play.
The Mets didn't get it.
Morse lashed Mejia's first pitch to the edge of the warning track in right-center, far beyond the Mets' outfielders, who were playing shallow in case they had to try to throw out Pence at home plate. It was Morse's fourth career walk-off hit and his first since May 27, 2011, when he homered off San Diego's Mike Adams as a member of the Nationals. The ecstatic Giants engulfed Morse between first and second.
The Giants were fortunate to have kept the score close, as starter Tim Hudson endured his least-effective outing in a San Francisco uniform, working five innings. He surrendered three runs and seven hits in the first three innings, exceeding the number of earned runs he allowed in all but one of his previous 11 starts and topping the hit total he surrendered in eight games.
This was Hudson's briefest performance of the season, other than his three-inning stint in the suspended game at Colorado on May 22. Considering the nine hits and three walks the Mets amassed off him, he did well to limit them to three runs. The Mets probably should have scored more than twice in the third inning, but Ruben Tejada was tagged out between second and third on Recker's bases-loaded single off the right-field wall. Pence played the carom perfectly and quickly relayed the ball to second baseman Brandon Hicks, which likely led to the traffic jam of baserunners.
The Mets ultimately stranded 12 and went 3-for-18 with men in scoring position.
Earlier, the Giants squandered several scoring chances. Trailing, 3-0, they staged a promising rally in the fifth inning by loading the bases with nobody out against Mets starter Bartolo Colon. But Posey, who delivered Friday night's tiebreaking two-run homer, grounded into a double play to dampen the rally.
Posey received another bases-loaded opportunity with two outs in the sixth. This time, Posey struck out, flailing at a 96-mph fastball from reliever Jeurys Familia.