Joakim Nordstrom scored his first goal for the Flames (16-20-3), who have lost three in a row and are 2-8-0 since a three-game winning streak that started when Darryl Sutter took over as coach March 11.
"In order to keep up, your team has to play at a pace and you have to be able to execute at that pace and you have to check at that pace, and for some of our players, that's difficult," Sutter said.
The teams will play again here Monday.
Tavares put Toronto up 3-2 at 6:55 of the third when the rebound from his shot went in off the skate of defenseman Noah Hanifin.
"We defended really well and played a quicker game in the third, which I think allowed us to take control," Tavares said. "There's going to be nights when you don't have your best, but you've got to work and compete and find ways to get your game going, and I think we did that."
Matthews scored his NHL-leading 25th goal from the slot off a pass by Mitchell Marner to make it 4-2 at 9:16.
"You've got to be able to make plays still when games are close in the third period," Calgary captain Mark Giordano said. "They had a push there. We have to have our own push, and we have to be confident to make plays under pressure when games are tight.
"A couple breakdowns. That's a good team over there. There's a reason they are where they are, and you could tell they were coming out with the mentality to win the game in the third. We have to have that same mentality when games are tied or you're down, whatever the case, you have to have that confidence."