Antti Niemi stopped 16 of 19 shots to record his 11th career won over the Flames, his most against any team.
Karri Ramo, making his first start since the season opener, made 30 saves.
Burns gave the Sharks, who are 8-2-1 against Calgary in their past 11 meetings, the early lead with an easy tap from in front of the net. Pavelski beat Kris Russell to a puck in the corner and fed a wide-open Burns less than a minute into the contest.
Hannan made it 2-0 in the final minute of the first period with a long shot.
Monahan put the Flames on the board with a power-play goal early in the second period. Sven Baertschi fed him the puck from behind the net, making it easy to beat Niemi.
Pavelski and Marleau, who has a goal in five straight games, each scored on power plays — both getting an assist on the other's score — to give the Sharks a 4-1 edge heading into the third period.
The Flames scored twice in the first four minutes of the final period to pull to 4-3. Lee Stempniak took a shot that bounced off Niemi's pads directly to Backlund, who scored the short-handed goal before the Sharks' goalie cold recover.
Hudler scored two minutes later after taking a nice crossing pass from Monahan.
Pavelski redirected Couture's shot for a power-play goal midway through the third period to put the Sharks on top 5-3.
Couture added an empty-netter with 1:22 remaining to play.
NOTES: Burns missed a penalty shot in the first period as Ramo made a stick save on the near post. ... San Jose F Bracken Kearns was assigned to Worchester of the AHL. ... The Sharks scored in the first minute for the fourth time in their first eight games. ... Hannan recorded his 200th career point with his goal. ... Hudler has a point in each of the Flames seven games. ... Monahan has scored in six of seven. ... Pavelski recorded his 20th career multi-goal game.