Pavelski scored on a deflection in the first period and on the power play in the second to give him five goals in his past two games and 18 in the past 20 to tie Anaheim's Corey Perry with 27 on the season. Only Washington's Alex Ovechkin has more this season with 35.
Tommy Wingels also scored and Antti Niemi made 21 saves for the Sharks, who returned home from a perfect three-game road trip with a win over struggling Calgary to open a pre-Olympic stretch of eight games out of 10 at home.
Jiri Hudler and Kevin Westgarth scored for the Flames, who have lost four straight games and 11 of 13. Karri Ramo made 24 saves.
Pavelski followed up his first career hat trick on Saturday in Tampa Bay with his third multi-goal game in his past six games as he thrives on a line with Joe Thornton and Brent Burns. Pavelski is only four goals shy of matching his career high of 31 set two seasons ago.
He broke a tie late in the second period after Matt Stajan was sent off for interfering with Eriah Hayes on the first penalty of the game.
After a broken play at the blue line, Jason Demers kept the puck in the offensive zone and passed to Thornton, who was all alone on the opposite side of the ice.
Thornton fired a cross-ice pass to Pavelski, who was alone near the front of the net and deflected the pass past Ramo to give the Sharks a 3-2 lead. That set off another round of "U-S-A! U-S-A!" chants from the crowd for the Olympian.
Both teams scored twice during the first period with help from shaky goaltending from Niemi and Ramo. The four goals came on 18 shots and included three in a span of 1:12 midway through the period.
The Flames started the scoring when Hudler beat Brad Stuart in the corner and then beat Niemi with a backhand from in front of the net for his 13th goal.
The Sharks responded with two goals in a 21-second span with Pavelski tipping Justin Braun's point shot for his 26th goal of the season and 17th in the past 20 games.
Before that goal could even be announced, Wingels ended a 15-game goalless stretch on a bad angle shot from near the boards that beat Ramo to give the Sharks the lead.
Less than a minute later, Niemi allowed a big rebound in the slot on a shot by Brian McGrattan and Westgarth got to the rebound ahead of Matt Irwin for his first goal in 23 games this season.
NOTES: With the assist on Pavelski's second goal, Thornton moved past Bobby Hull for 48th place on the career scoring list with 1,171 points. ... Flames F Paul Byron left the game in the second period with a lower-body injury. ... Calgary coach Bob Hartley was fined $25,000 for his role in the brawl after the opening faceoff against Vancouver on Saturday. ... Calgary F David Jones (eye) returned to the lineup after missing eight games and D Kris Russell (knee) was back after missing the past 13 games.