Dennis Wideman opened the scoring 40 seconds into the game, blasting a shot from the point past Antti Niemi.
Joe Colborne scored the Flames third short-handed goal of the year at the 5:59 mark of the first period.
The Sharks struck 12 seconds into the second period. Logan Couture's wrist shot beat Joni Ortio glove side.
Four goals were scored in the second period - three by the Sharks, one by the Flames - and the teams were all tied up, 3-3, after 40:00. Logan Couture, Joe Thornton, and Melker Karlsson scored for San Jose. Jiri Hudler netted Calgary's goal.
Mikael Backlund has seven points in his last five games. He set up Jiri Hudler's second period goal.
Just 24 seconds into overtime, Sean Monahan scored the game-winner.