Tomas Tatar scored twice, and Jake Allen made 23 saves in his fourth straight start for Montreal (18-12-9), which ended a three-game losing streak.
"It's something to build off, that's all it is," Allen said. "You can't get too high on one win. You've just got to keep building and find a way to get better every day. And I think there's room for that."
Auston Matthews scored his NHL-leading 32nd goal for Toronto (28-11-3), which had a six-game winning streak and 10-game point streak end (9-0-1).
"We just weren't ready to go today, and that's my job," Maple Leafs coach Sheldon Keefe said. "The coach's job is to get the team ready to play. We weren't ready to play, so that one falls on me."
Josh Anderson gave Montreal a 3-2 lead at 16:22 of the second period, scoring on a wrist shot from the right side after Toronto scored twice earlier in the period to tie it.
Tatar made it 4-2 with a backhand into an empty net at 17:35 of the third period after Campbell was pulled for an extra attacker.
"It was important for us as a team to bounce back," Canadiens forward Phillip Danault said. "We knew we had a little slump and we showed a lot of character tonight. We were a bit hesitant in the second period, but we recovered and started winning battles again, so it was a big character win. And you have to give Jake credit too. He made big saves and gave us a chance to win."