Auston Matthews scored two goals, and Martin Jones made 26 saves for the Maple Leafs (21-10-8), who had won four straight.
"Special teams were rotten tonight," Toronto coach Sheldon Keefe said. "Our power play, penalty kill, and overtime [were rotten]. That costs you games. Our power play had one chance and did nothing with it. It's as bad as we've looked on any power play, and on the penalty kill, the puck's in our net before we could blink to start the game."
Palmieri gave New York a 1-0 lead 40 seconds into the game with a power-play goal. His initial deflection of Dobson's point shot was stopped by Jones, but he tapped in the rebound from the edge of the crease.
Bobby McMann tied it 1-1 at 12:39. TJ Brodie kept the puck in at the blue line by sending a backhand pass to Noah Gregor, who then found McMann for a one-timer from the bottom of the right circle.
Matthews gave Toronto a 2-1 lead 26 seconds into the second period. He slid in a backhand from in front after two Islanders defensemen chased the play below the goal line.
Matthews then made it 3-1 at 2:40, beating Sorokin five-hole on a breakaway after Pontus Holmberg stripped the puck from Dobson in the Islanders' zone.
"I thought there was a lot of good we did in the game," Matthews said. "They're a good team. They play really well on both sides of the puck. They make it hard on you offensively, so I thought it was pretty back-and-forth. Just a game of inches out there."