DiPietro made 39 saves, and Viktor Kozlov and Frans Nielsen scored in the shootout to lead the Islanders to a 3-2 victory over the Maple Leafs on Tuesday night.
Trent Hunter and Miroslav Satan scored in regulation for the Islanders, who are tied with Toronto for ninth place in the East. The teams are within two points of Montreal for eighth.
DiPietro stopped 16 shots in the third and made two big saves on Alexei Ponikarovsky and Nik Antropov in the shootout.
"I don't think we've won here in five years, and these points are so important," said DiPietro, whose team was 0-10-1 in its last 11 visits at Toronto. "It's a tough race. Toronto is in the same boat as we are. We're trying to fight our way up. There's a lot of teams in front of us."
Nielsen and Kozlov both scored on back-handed shots in the shootout.
Nielsen doesn't have a goal in his NHL career and he scored in the shootout on his first attempt.
New York coach Ted Nolan put Nielsen out as the first shooter after Nielsen went 7-for-7 in a shootout practice on Monday.
"I was pretty nervous," Nielsen said. "It was great playing here. I haven't been back here since I was drafted in this rink. I dreamed about playing in this city for many years."
Pavel Kubina and Bates Battaglia scored for the Maple Leafs, 11-13-4 at home this season. Only Philadelphia, the NHL's worst team, has fewer home victories than the Leafs with five.
"We had good enough chances to win the hockey game, but Rick made some great saves. Give him credit," Toronto captain Mats Sundin said. "He played a really great game. He gave them a chance to get two points."
Kubina, who signed a four-year, $20 million contract in the offseason, scored just his fifth goal when his point shot beat DiPietro at 6:14 of the first.
The Islanders took the lead in the second with two goals scored 27 seconds apart. Hunter tied it with a wrist shot glove side at 4:49 of the second -- the kind of goal netminder Andrew Raycroft has often given up lately. Satan scored on a back-handed shot from the side of the net.
Battaglia tied it by skating from behind the net and putting a back-hander past DiPietro.
DiPietro made several impressive saves in the third when Toronto outshot New York 16-1. He robbed Tomas Kaberle of a goal with a sprawling glove save five minutes into the period and made another nice glove stop on Boyd Devereaux late in the frame.
"That was a good a save as we've seen all year," Nolan said of the stop on Kaberle.
DiPietro also denied Toronto's Alex Steen from the side of the net in overtime.
Toronto forward John Pohl missed the game with back spasms. ... The Islanders dropped their third in a row away from home on Saturday, losing 4-3 in a shootout at Boston. ... New York captain Alexei Yashin missed his seventh consecutive game with a knee injury.