Following a turnover by Maple Leafs defenseman Travis Dermott, Kotkaniemi took a pass from Paul Byron in the slot and scored on a shot that deflected off Zach Bogosian and past Jack Campbell's glove.
"It's pretty remarkable," Kotkaniemi said. "It was a great feeling, especially with the fans in the stands."
A crowd of about 2,500 was permitted to attend the game, the first among the seven Canada-based NHL teams with fans since March 11, 2020.
"It was pretty cool going out for warmups and seeing them, seeing the towels go," Canadiens forward Tyler Toffoli said. "They were fired up and they definitely gave us that emotion to start the game. And I thought we played really good. Obviously, a couple of tough bounces, but we stuck with it, and obviously a big goal by 'KK.'"
Toffoli and Corey Perry each scored a power-play goal, and Carey Price made 41 saves for Montreal, the No. 4 seed in the Scotia North Division, which blew a two-goal lead in the third period for the second straight game before recovering to win in overtime.
"There's no quit in this group, and even though we've given up leads in the last couple games, we grinded it out," Canadiens captain Shea Weber said. "Tonight, I thought 'Pricey' played unbelievable. He kept us in it, especially in overtime there when they were pushing, and gave us a chance, and obviously that made the difference."