The wild victory came after the Maple Leafs gave up a two-goal lead in the third period.
Phaneuf took a pass at the point from Mikhail Grabovski and headed for the net. His quick shot caromed off Nabokov's pads and slipped across the line.
Toronto's Nazen Kadri produced his first career hat trick and he finished off a stretch of three straight goals in the third period that gave the Maple Leafs a 4-2 lead.
Andrew MacDonald and Kyle Okposo then tallied for the Islanders in the third period to force overtime.
James van Riemsdyk contributed one of the three Toronto goals in the third period, his 12th of the season. That moves him into the top five in NHL goal scoring, two behind league-leader Steven Stamkos of Tampa Bay.
The win went to James Reimer, who made 23 saves. Nabokov surrendered all five goals on 28 shots.
Disney's 'Jessie' to feature network's first engagement
Iranian woman stops the execution of son's killer