Nylander, who also had an assist, had just come off the bench and took a stretch pass from Mitch Marner at the offensive blueline, shooting past Jacob Markstrom's glove on a breakaway.
“I think we gained our momentum,” Nylander said. “We had a lot of hard work and that started paying off, started getting more high-quality scoring chances so just try to build off that. I just saw an opening and he just put it right there and I was able to walk in.”
Auston Matthews scored twice, and Joseph Woll made 21 saves for the Maple Leafs (28-16-2), who had lost three in a row in regulation. Marner and Jake McCabe, who returned after missing the past four games with an upper-body injury, each had two assists.
“Battling,” Toronto coach Craig Berube said. “I thought we battled hard all game, that was the biggest thing for me. Our battle, our second and third effort in all zones.”
Jack Hughes scored and had two assists, Nico Hischier scored twice and Markstrom made 37 saves for the Devils (26-15-6), who are 2-4-3 in their past nine.
“The way we managed the overtime, that was against everything that we’ve talked about in terms of managing,” New Jersey coach Sheldon Keefe said. “One hits the post and could go in and changes everything but we had the puck again and just how we managed that was just unacceptable.”
After controlling the puck for most of the first minute, the Devils took a low percentage shot, turning over possession, and were in the midst of a change when Nylander snuck behind the defense to take the pass that led to the breakaway.
The Maple Leafs were without forward John Tavares, who is week to week with a lower body injury sustained in practice on Wednesday.
Matthews tied it 3-3 at 15:47 of the third period when he shot over Markstrom's right shoulder from below the left face-off dot.
“I think it was just one shift at a time, not losing our composure, staying focused and being really competitive all over the ice,” Matthews said. “I thought the second and third periods were really good periods by our group and even when we tied the game and gave up the lead again, I thought we just stayed with it, rolled it shift after shift and were able to tie it up and finish the job in overtime.”
Hughes put the Devils up 1-0 at 2:21 of the first period. Johnathan Kovacevic kept the puck in at the blueline and found Hughes, who had fallen earlier in the play, alone in front of the net. He deked to the backhand to beat Woll glove side.