It was Staal's second goal of the game and came with Toronto's Tim Connolly in the penalty box for tripping.
It was a 1-1 game heading into the third period and Toronto appeared to have taken control when it built a 3-1 advantage on goals by Nikolai Kulemin and Joffrey Lupul.
Staal started the rally with 10:12 to go in regulation and Zack Dalpe tied it by tipping in a shot 2:02 later. It was Dalpe's first goal of the season and just the fourth of his 26-game NHL career.
Staal's game-winner came on a slap shot that sailed over the shoulder of James Reimer.
The win went to Cam Ward, who made 21 saves.
Reimer gave up four goals on 34 shots.