Mikael Backlund was sent off for boarding at 11:54, giving the Flyers their first powerplay of the night.
Their best chance when Keith Yandle's shot from above the left faceoff dot missed the net but bounced off the end boards and Sean Couturier - standing by the right pipe, grabbed the puck and tried to stuff it in but was denied by Markstrom's outstretched left pad as he lunged across.
Philly then got 31 seconds of 5-on-3 time when Andrew Mangiapane was called for holding the stick.
The Flames PK - which came into the game ranked eight in the NHL at 85.7% - and was a perfect 8-for-8 in their last two outings - killed off both.
They later killed off another one when Matthew Tkachuk was tagged for interference, going 3-for-3 in the opening stanza.
They went 0-for-1, getting two shots on their lone powerplay in the first.
Early in the second, Markstrom made a point-blank save on Ivan Provorov who walked in all alone through the slot.
On the Flames second PP of the night, Noah Hanifin rang a wrister off the far post on a rush, the rebound coming right to the stick of a trailing Mangiapane but Hart was able to stop his wrister.
Steve Laughton was sprung on a partial brekaaway as he came out of the penalty box and Rasmus Andersson was called for pulling him down, leading to rare penalty shot. Laughton skated in and held it the puck trying to outwait Markstrom, who stacked the pads to make an excellent save.
Kevin Hayes tied the game at 4:37, his first pass/shot attempt blocked by Andersson but the puck coming right back to him and he snapped it into an open cage after Markstrom slid across the other way.
The Flames had a flurry of chances in quick succession later in the second:
In the final minute of play in the second, Gaudreau was once again making magic, sending a spinning backhand pass to Lindholm who was denied yet again by Hart.
Cam Atkinson ended up with the OT winner 45 seconds into extra time.