Bunting tied it 1-1 at 1:36 of the second period when his redirection of Morgan Rielly's pass trickled over the goal line.
Toronto outshot New York 17-2 in the second period.
"I mean, we won but we had a bad second period," Gallant said. "We were a little sleepy in the second, obviously, and got dominated, but I thought our first was OK, our third was OK, our overtime was OK. But did we have a bad 25 minutes, yeah."
William Nylander had a chance to win it at 1:17 of overtime when he got around Panarin and skated in alone, but Shesterkin made a pad save.
"[Shesterkin] was pretty spectacular all night. We didn't have our best game, but sometimes you need your goalie to steal one for you, and he definitely did it tonight," New York defenseman Jacob Trouba said. "We weren't at our best, but we found a way to grind through it. We gave up way too many shots, way too many chances, but he was there so I give him a lot of credit."
Auston Matthews made his season debut for the Maple Leafs after missing the first three games while recovering from wrist surgery he had Aug. 13. He had eight shots in 22:53 of ice time.
"I thought my timing was all right," Matthews said. "For the first game, I can definitely walk away happy with it. I got some good chances, some good looks and I think that's all you can ask for. I felt pretty good. I thought the guys around me did a really good job of helping me get into the game early."
NOTES:Shesterkin's win was his seventh in which he has made at least 40 saves since 2019-20, the most in the NHL.