Scoreless after two shots each, Cammalleri moved in from off the right wing and went short side on Alex Stalock, setting off a roar from the Scotiabank Saddledome crowd announced at 19,289.
It then came down to Karri Ramo, who stopped 33 shots in regulation time, and he completed a perfect three-for-three in the shootout by thwarting James Sheppard. That came on the heels of stops against Patrick Marleau and Joe Pavelski.
Joe Colborne scored in regulation for Calgary (30-35-7). The Flames have won 10 of their last 13 on home ice.
It was also Calgary's league-leading 43rd one-goal game. They are two away from the club record of 45 set in 2005-06.
Sheppard scored in regulation for San Jose (46-18-9), which sees its four-game road winning streak come to an end.
San Jose does increase its lead atop the Pacific Division to two points over Anaheim. The Ducks hold two games in hand. With the point, the Sharks also clinch a playoff spot for the 10th consecutive season.
After being outplayed much of the first period, Calgary had a much better second.
The Flames kept up the pressure and it eventually paid off on Colborne's ninth goal at 18:00, the result of a heady play by rookie defenceman Tyler Wotherspoon.
Playing his 10th NHL game, the 21-year-old spotted Colborne alone at the far face-off circle and hit him with a perfect cross-ice pass that Colborne stopped, controlled and deftly wristed over Stalock as he desperately slid across.
Five of Colborne's goals have come in the past 11 games.
Calgary carried that momentum into the third period with Jiri Hudler nearly orchestrating the go-ahead goal twice. First setting up Matt Stajan for a re-direction that went off the side of the net. And later in the period, his pass to Curtis Glencross forced Stalock to make another solid save.
But after that, San Jose regained control with Ramo having to make some timely stops, including a pad stop off the dangerous Joe Pavelski at the side of the net.
After missing six weeks with a knee injury, Ramo's first two starts since his return have been excellent. After stopping 24-of-25 against Edmonton in the Flames 8-1 win on Saturday night, he made 33 saves against San Jose.
Ramo improved to 13-10-4.
Stalock had 26 saves in regulation. He hasn't lost in regulation in his last six starts (4-0-2) and is 11-4-2 on the year.
Stalock was particularly sharp early in the game as the Sharks carried the play in the first period, outshooting the home side 18-8. However, the score was still 0-0 until the final two minutes when San Jose took advantage of a lucky bounce.
Matt Nieto's shot hit Sheppard in the back as he skated through the slot. With Ramo caught out of position as a result, Sheppard corralled the puck as it fell to the ice and fired in the open net.
It's the second goal in as many games for Sheppard, matching his output from the season's first 56 games.
However, the Sharks didn't get out of the first period unscathed. Logan Couture, credited with three blocked shots in the period, left late in the period after blocking two Mark Giordano shots on the same power play, the first of which appeared to hit him in the ankle and left him grimacing noticeably.
Couture did get some treatment and returned to the game late in the second period.
Notes: San Jose D Brad Stuart (upper body) returned after missing 13 games...San Jose owns the fourth longest playoff streak in professional sports (NHL, NFL, NBA, MLB). They trail Detroit Red Wings (22), San Antonio Spurs (16) and Denver Nuggets (10).