Andrew Mangiapane scored with less than four minutes left in the third but then William Nylander tied it with 1:28 to go and then tallied the OT winner 1:06 into extra time.
Prior to his first goal, the Flames had held the potent Toronto attack scoreless for 118:32.
They also pitched a shutout against their top-ranked powerplay in the two games, the Leafs 0-11 in that department.
Jacob Markstrom missed his second straight game, Artyom Zagidulin serving as the backup.
The Flames got an early powerplay at 4:51 when Jimmy Vesey tripped Chris Tanev, the best look coming late by the second powerplay unit when Mangiapane was stopped point blank by Michael Hutchinson, who also started for Toronto last game.
Zach Hyman - back in the lineup after missing Monday's game - gave Rittich his first test with a wrister using Rasmus Andersson as a screen, the netminder making a glove stop.
Andersson then hooked Hyman and Toronto went on the powerplay at 8:19, their first of three in the opening frame. They only got one shot, the Flames doing a great job keeping them from getting set up and clogging lanes.
Just 27 seconds after that advantage ended, Calgary went back to the box when Josh Leivo tripped Jason Spezza. This time they held them to no shots, Mikael Backlund's pass on a shorthanded 2-on-1 just off the end of Mangiapane's stick.
The last advantage came with less than three minutes left, Noah Hanifin whistled for hooking Pierre Engvall.
Another no-go for Toronto
Despite the three advantages, the Leafs only outshot the Flames 11-7.
There were plenty of great chances for both clubs in the second, mixed in with some great individual defensive plays from the Flames.
Early in the frame, Sean Monahan feathered a perfect saucer pass over a sliding Toronto defender right onto the stick of Matthew Tkachuk, but Hutchinson made the stop.
Backlund showed why he's one of the best two-way forwards in the league, when he deftly stripped Auston Matthews of the puck right in the Calgary slot, kicking the puck onto his stick and leading a rush up ice that ended with Dillon Dube denied on a cross-ice one timer from a pass courtesy of Juuso Valimaki.
Then Oliver Kylington - starting his second straight game - made a great recovery after Spezza took a long stretch pass in behind him, the Flames defenceman getting back and knocking the puck off the Toronto forward's stick which led to a chance at the other end, Mangiapane denied on his shot.
Rittich's biggest stop of the middle stanza came on John Tavares, who he robbed by diving across his net Monday to get his blocker on an attempt on a wide open net.
This time, Tavares got the puck low and cut across the net, Rittich able to quickly come back across his net in a display of athleticism and deny him with his right pad, leading to Backlund giving his netminder a hug after the whistle.