In an odd game that was way closer than it should have been, San Jose won 3-2 on Brad Stuart's goal 1:13 into overtime.
Stuart jumped up in the rush, drove the net and had Joe Thornton's shot deflect sharply off his elbow and past Reto Berra for the winner.
"It's been a long time since I've had an overtime goal," said Stuart. "It wasn't pretty but I'm not going to tell anybody how it went in, it just went in."
San Jose dominated play throughout the game, outshooting Calgary 35-13, yet weren't able to put the game away.
"We've had a lot of close games and just haven't been able to finish it," said Stuart. "Tonight, we let them back in it and we shouldn't have but for us to get the points, it'll be a good positive for us moving forward."
From the start of the game, Calgary's trademark work ethic was absent and that was a source of frustration for the coaching staff.
"That was the biggest spanking that we've taken in the first period," said Flames coach Bob Hartley. "We didn't touch the puck. The only way that we could have touched the puck is if we would have had two pucks out there."
San Jose got a goal from Logan Couture on its second shift of the game and then a power-play goal from Patrick Marleau in the final minute, taking a 2-0 lead in a period in which they outshot the home side 17-3.
"In the first period, we didn't see our team at all," Hartley said. "I asked (assistant coach) Marty Gelinas, should I change my lines and he said yes. I started looking and I couldn't find three guys that I felt that had decent energy."
Down 28-6 on the shot clock after 40 minutes yet only down 2-0 thanks to Berra, Calgary finally got enough going in the third to rally back and tie it.
Calgary's comeback bid began when it got its first power play of the night six minutes into the period. The Flames would need just five seconds to convert.
Rookie Sean Monahan cleanly won a faceoff from Thornton, pulling the puck back to Kris Russell and the Flames defenceman ripped a slapshot past Sharks goaltender Alex Stalock.
The goal snapped a 0-for-30 drought on the power play for Calgary that had lasted nine games and covered more than 54 minutes.
Less than four minutes later, Mike Cammalleri tied it on a backhand at 10:25, setting off a deafening roar from the sell-out Scotiabank Saddledome crowd, announced at 19,289, who until the third period had very little to cheer about.
But that momentary surge would be the long bright spot on the evening for the Flames, who were kicking off a three-game homestand.
"We're all proud people and that's been something from day one, we've been a team that played with pride and we don't want to be beat, playing in games where our shot totals look like that," said Cammalleri. "I don't see any moral victories in that."
After missing the first seven games with a hand injury, the pending unrestricted free agent leads the Flames with eight goals in 11 games.
"In the third, we were desperate and I felt that we saw our good old team again but all that said. If not for Reto Berra, the Sharks can get on the plane after the first period and they'd already have the two points," said Hartley.
San Jose (11-2-5) snaps a five-game winless skid, although in a similar way to Tuesday's result, it was misleading. During the span, they had three shootout losses and one loss in overtime.
"We've been playing good hockey, we just haven't been winning shootouts. To get the full two (points), it's finally nice," said Thornton. "We had two hiccups but we played good tonight. That's how we need to play every night."
Calgary (6-9-3), kicking off a three-game homestand, is winless in its last four.
Berra's record falls to 1-2-1 while Stalock continues his unusual distinction of having won more games than he has started in his brief NHL time.
He won his NHL debut in relief on Feb. 1, 2011. Replacing Antti Niemi halfway through the second period with the Sharks down 3-0 to Phoenix, he made nine saves as San Jose rallied back to beat the Coyotes 5-3.
In his first NHL start just over two weeks ago, it was a much busier evening as he was peppered for 40 shots in San Jose's 5-2 win over the Ottawa Senators.
"The other guy played pretty good. He saw a lot of rubber and played a heck of a game for them," said Stalock, the 26-year-old from St. Paul, Minnesota. "On my end, it was pretty quiet for two periods. It was a little tougher. You've got a lot more time to think about the next puck than just reacting."
Notes: Ladislav Smid made his Flames debut, playing 16:50... Lee Stempniak (broken foot) returned to Calgary's line-up after missing seven games... Scratched for the Flames were forwards Tim Jackman and Max Reinhart, as well as veteran D Sean O'Brien... San Jose made two line-up changes: Stuart returned after sitting out a game and C John McCarthy was inserted... In his last five games, Niemi has a 3.82 goals-against average and .878 save percentage. In his first 11 games, he was 1.53 GAA and .933 SV%.