The next inning, Pagan followed a Brandon Belt walk with a single to left, and both runners advanced on a passed ball to set up Crawford's game-winning single to center.
Both players credited the big double play with fueling the energy for the rally.
"We're in first place right now, so we have to play that kind of baseball," Pagan said. "It does give you some momentum and it picks you up, and I felt that kind of energy when I went to the plate."
"They say hitting is contagious, but I think defense is, too," Crawford said.
"I was just trying to prevent the run," Pagan said. "First three steps, you're just trying to get a good jump. As I was getting close to the ball I knew I had a good chance. The last little bit of my glove got it."
"A fabulous catch by Pagan," Padres manager Bud Black said. "It saved the game. It was one of the best catches I've seen in a long, long time."
Pagan had been stuck in a 4-for-29 slump (.138) in the last eight games before his ninth-inning single.
"I needed that momentum to get that wake-up call and do a little better," Pagan said.
The Giants' rally came after Padres starter Edinson Volquez shut them down following a two-run first inning, holding San Francisco hitless for the next six frames.
Volquez battled Madison Bumgarner, who gave up two earned runs on six hits in his seven innings.
"I was behind a lot, that was probably the least amount of fastball's I've ever thrown in a game, ever," Bumgarner said. "My command was a little off."
The Giants took the lead when Melky Cabrera's groundout plated Nate Schierholtz in the first inning, and Pablo Sandoval later followed with an RBI double to right-center.
The Padres tied it up in the second inning when an RBI double from Jesus Guzman scored Quentin, who had also reached with a double. A bloop single from Volquez over the head of second baseman Ryan Theriot in shallow right plated Guzman.
Sandoval left the game with a strained left hamstring after stretching for a throw that finished a double play in the third inning, and the team said he would have an MRI on Wednesday.
"You don't see a first baseman get that often, but he did stretch quite a bit on that," Bochy said.
The Giants have won nine of their last 11 games and are a season-best 13 games over .500. With the Dodgers' 8-2 loss to the Cardinals on Tuesday, the Giants hold a 2 1/2-game lead in the National League West.
"We're playing pretty good," Bumgarner said. "It feels good, and it feels like we have a chance to win every day, no matter the lineup, no matter the score."