With the scored tied 2-2 with less than 5 minutes to go, Matt Moulson broke out of his own end after the Bruins -- expecting an icing call that never came -- let up, racing untouched toward the net.
He unleashed a shot at Bruins goalie Tim Thomas that Tavares redirected into the goal, and the Islanders held on to break a five-game road losing streak.
Moulson also scored on a second-period power play and Josh Bailey added a tally for the Islanders.
Evgeni Nabokov earned the victory by stopping 32-of-34 shots.
Milan Lucic and Taylor Seguin provided goals for Northeast Division-leading Boston.
Tuukka Rask started in goal and turned aside 11-of-12 shots before leaving the game 9 minutes into the second period after appearing to injure a leg on a save attempt.
The netminder had to be helped off the ice.
Thomas entered and stopped 11-of-13 the rest of the way.
Notable deaths of 2014 [PHOTOS]