The Hurricanes improved to 3-0 against the Bruins this season despite trailing the second-placed Bruins by 18 points in the Eastern Conference standings.
Boston opened the scoring six minutes into the second period on a rebound goal by Patrice Bergeron. The Hurricanes responded with a strong push back and tied the score four minutes later with a tip-in by Patrick Dwyer.
Milan Lucic restored the Bruins lead with a well-placed wrist shot to the top corner early in the third period.
Carolina then claimed the lead for the first time with 90 seconds remaining after Jay Harrison's shot from the blue line bounced off a couple of players before finishing in the net behind Thomas.
The Bruins then pulled Thomas for an extra attacker in a late bid to force overtime but Eric Staal took advantage of the void to score into the empty net with a minute remaining.