Mika Zibanejad had a goal and an assist for New York (2-1-1), the 100th two-point game of his NHL career.
Michael Bunting scored for Toronto (2-1-1), which got 21 saves from Jack Campbell.
Panarin won it at 3:48 of a frantic, end-to-end extra period off a faceoff in the Maple Leafs' end. He played a quick give-and-go with Zibanejad before firing a shot past Campbell.
''We stole one,'' Zibanejad said. ''I don't think we played good enough for long enough.
''Igor, if it's not for him, then I don't want to imagine what would happen.''
Auston Matthews made his season debut for the Maple Leafs after sitting out Toronto's first three games as he finished rehabbing following surgery on his left wrist.
The 24-year-old center dealt with the nagging injury much of last season when the schedule was shortened to 56 games due to the COVID-19 pandemic, but still led the NHL with a career-high 41 goals in just 52 games.
Matthews had a game-high 16 shot attempts - including eight on target - and played 22:53 in his first game since May 31.
''The adrenalin the first 10 minutes kept me in it,'' Matthews said. ''Just hopping right out there, I could sense a little bit of fatigue setting in, but I tried to push through it.''
Monday's game was the first for Toronto against a U.S.-based opponent since the Columbus Blue Jackets defeated the Maple Leafs on Aug. 9, 2020, to win their qualifying round series at Scotiabank Arena inside the NHL's postseason bubble.
The league's seven Canadian franchises played in the one-time-only North Division in 2020-21 because of pandemic border restrictions related to non-essential international travel.
Monday's attendance was announced at 18,098, marking the third consecutive game at Scotiabank Arena that fell short of a sellout.
But while the building wasn't quite full, it was certainly loud - especially during the edge-of-your-seat overtime.
''It felt awesome, honestly,'' said Matthews, who despite the loss was still smiling following his first game at home with paying fans since March 2020. ''Just the energy . you can feel it throughout the rink.
''It was a lot of fun.''
The Maple Leafs welcomed crowds of 18,493 and 18,211 last week - fans 12 years of age and up must be fully vaccinated and all spectators are required to wear masks when not eating or drinking - after getting the green light from the provincial government to push capacity limits to 100%.
The Maple Leafs consider anything over 18,819 to be a full house, although the team drew 19,124 fans on March 10, 2020, in its last home game before the pandemic brought the sports world to a halt.
''Just to be playing in front of fans again, it's quite a feeling,'' Matthews said.
Matthews didn't have to wait long to test out his wrist, but Shesterkin turned away his first two shots on a Toronto power play early in the first.
Nils Lundkvist hit the post behind Campbell at the other end a couple of minutes later before Zibanejad eventually opened the scoring off a turnover when he ripped a shot that struck iron and pinballed off the television camera inside Toronto's net at 13:49.
Maple Leafs winger William Nylander, who came in with points in all three games, then hit the post off a slick feed from Matthews in the neutral zone.
Toronto pulled even 1:36 into the second when Morgan Rielly's shot on Shesterkin caromed in off a hard-charging Bunting for his second goal in two games.
The Rangers, who played without winger Kaapo Kakko (upper-body injury) and center Ryan Strome (COVID-19 protocol), were on their heels most of the period as the Maple Leafs came in waves.
But Shesterkin stood tall on chances for Travis Dermott and Matthews on the follow. New York's netminder then robbed both Matthews and Rielly to keep it 1-all despite Toronto's 53-20 edge in shot attempts through 40 minutes.
Matthews fired his sixth shot of the night on Shesterkin early in the third on a Rangers giveaway, but was again unable to find a way through.
Campbell didn't have a lot to do at the other end until he made a big stop on Sammy Blais midway through the period - which had the crowd responding with a resounding ''Souuuuup'' chant in honor of the Toronto goalie's nickname.
''Shesterkin played really well,'' said Campbell, who made a couple of big saves in overtime. ''It was a good challenge.''
NOTES: Michael Hutchinson dressed as Campbell's backup after the Maple Leafs were forced to sign University of Toronto goalie Alex Bishop to a one-day amateur tryout contract ahead of Saturday's 3-1 win over the Ottawa Senators because of a salary cap squeeze with Petr Mrazek (groin) unavailable. . The No. 2 pick in the 2019 NHL draft, Kaapo was injured in the first period of Saturday's 3-1 victory in Montreal.
Rangers: Play at Nashville on Thursday night.
Maple Leafs: Host the San Jose Sharks on Friday before heading out on a U.S. road trip for the first time since March 2020, beginning Saturday in Pittsburgh.
More AP NHL: https://apnews.com/hub/NHL and https://twitter.com/AP-Sports
Copyright 2022 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.