Avery got New York even at 1-1 in the first period, set up Martin Straka's team-leading 29th in the middle period, and gave the Rangers a 5-2 lead later in the second with his 18th of the season.
Michael Nylander had his career-best tying 25th goal and an assist. Ryan Callahan, Michael Rozsival and Jaromir Jagr also scored for the Rangers, who have points in 15 of 17 games (12-2-3).
That was plenty of offence to support goalie Henrik Lundqvist in the Rangers' seventh win in eight games. New York moved one point ahead of Tampa Bay into sixth place in the Eastern Conference with three games left.
The Maple Leafs, who showed tired legs in their third game in four days, are stuck in ninth - one point behind Montreal and the playoff cutoff. The Maple Leafs also have three games remaining, including a home contest against Montreal on Saturday to finish the season.
Alexei Ponikarovsky's power-play goal put Toronto ahead less than two minutes in, and Boyd Devereaux scored his fourth in six games to get the Leafs into a 2-2 tie. But Andrew Raycroft allowed four goals on 16 shots and was yanked 4:42 into the second period of his 39th start in 40 games after Straka made it 4-2.
Jean-Sebastien Aubin came on and gave up Avery's second unassisted goal of the night at 14:53. New York scored three times in the second on only six shots. The Maple Leafs led 27-25 in overall shots.
Avery got the Rangers on the board 5:19 in, 3:31 after Ponikarovsky's 21st goal, when he got to a rebound of Brendan Shanahan's shot above the right circle and sent the puck through traffic and by Raycroft. He punctuated the goal with his signature fist thrust, and celebrated with an emphatic slap of the glass.
That led to the first of two discussions between the officials and Avery in the period.
Less than a minute after Tucker served a penalty for roughing Avery, the Rangers' agitator tapped his Toronto counterpart on the leg with his stick before a faceoff. The two feisty forwards held a lengthy conversation while waiting for the puck drop, and Tucker had his gloves off the moment it hit the ice.
Avery was slow to shed his, much to Tucker's dismay, but then the fight was on. Both landed good shots during the bout that ended with Avery slamming Tucker onto his back. Avery engaged the officials in another animated talk when the period ended.
Devereaux made it 2-2 with 3:25 left in the first but Callahan restored the Rangers' lead 1:35 into the second.
Avery then set up Straka with a sling pass as he fell forward. The puck caromed off Leafs defenceman Bryan McCabe to Straka, who slammed it in at 4:42 - completing Avery's "Gordie Howe Hat Trick" of a goal, assist and a fight.
Avery added his second goal of the night with 5:07 left in the second, Rozsival added a power-play goal 6:49 into the third, and Jagr tied Straka for the team lead with his 29th at 12:14.
Notes: Rangers RW Jed Ortmeyer returned after sitting out Saturday's win at Philadelphia because of a knee injury. ... Maple Leafs captain Mats Sundin, one goal shy of tying Darryl Sittler's franchise record (389), was held without one for the ninth straight game. ... Nylander scored 25 with Chicago in the 2000-01 season.