Matthews pulled a one-handed pass between his skates and to his stick before shooting top corner over Vladar's glove to cut it to 2-1 at 18:24 of the first period.
His goal came 1:36 after Backlund hit the post on a shot off the rush.
"I thought it was big," said Matthews, who leads the NHL with 37 goals. "I don't think the first period, kind of start, was very good. I thought we were a little bit sluggish. Obviously, they come out pretty hot and score two, just to cut it to one before the second and get in the locker room and regroup and take a deep breath and get back out there and play, and that's exactly what we did."
Matthews scored again to tie it 2-2 at 4:08 of the second period when he one-timed a cross-ice pass from Nylander during a delayed penalty.
Marner put Toronto ahead 3-2 at 7:44 when he took a return cross-ice pass from Nylander and shot past Vladar on a 4-on-3 power play.
Connor Zary looked to have tied it at 8:39 of the third, but the Maple Leafs successfully challenged for a hand pass prior to the goal.
"It [stinks], but those are the rules," Andersson said. "You can challenge. It is what it is. But we don't lose the game there. We lose the game in the second period. Way too many turnovers in the neutral zone and against a team like that, if you give Matthews the pinky, he takes the whole hand. That's the way he is. He's a [heck] of a player, and he showed that today."
Matthews completed his fourth hat trick of the season when he backhanded a rebound of Matthew Knies’ shot for a 4-2 lead at 13:39.
"It's fun to watch," Jones said. "It's pretty impressive. It always feels like even when we're down two in the first, we're never really out of a game because we have those weapons that can dig us out of those holes."
Mangiapane made it 4-3 at 17:53 after video review determined that the puck hit Toronto defenseman Timothy Liljegren's stick before crossing the goal line after Mangiapane kicked it.
NOTES: Matthews recorded his 11th career hat trick, passing Rick Vaive (10) for sole possession of fourth in Maple Leafs history. He also has 71 multigoal games in his NHL career, tied with Darryl Sittler for the franchise lead. ... Toronto has won four consecutive games against Calgary and eight of its past 10 games here. ... Kadri has 11 points (six goals, five assists) in an eight-game point streak. ... Coleman had a four-game point streak (five goals, three assists) and a four-game goal streak end (five goals). … Flames forward Martin Pospisil left the game at 18:51 of the first period because of an upper-body injury. There was no update after the game.