Justin Morrow netted twice in the first half to put TFC 2-1 up at the break, but the Red Bulls, still fighting for their playoff lives, used a Daniel Royer penalty to pull level after 77 minutes.
Just three minutes later the home side would go back in front with a penalty of its own.
Aaron Long was called for a foul and TFC's Víctor Vázquez made good from the spot with what proved to be the Shield-winning goal.
Morrow rounded out his hat trick with a goal deep into stoppage time to put the match on ice.
TFC has been on top of the league standings since July 19, and this is the club's first trophy of any kind in MLS history.
Toronto locked up the best regular-season points total in MLS with two matches remaining, with the side at home against Montreal on Oct. 15 and away against Atlanta United on Oct. 22.