New York should have taken the lead in the 16th minute when Lloyd Sam beat a couple of defenders before delivering an inviting cross into the box, but Wright-Phillips could only head over from close range.
However, the hosts weren't left frustrated for too much longer as they went ahead with nine minutes remaining in the first half thanks to an unstoppable header from Peguy Luyindula, who lost his marker to meet Ambroise Oyongo's inch-perfect delivery.
Toronto responded well after the break, and were once again on level terms in the 55th minute when Defoe held off a couple of challenges inside the box before firing past a helpless Robles.
Both sides enjoyed periods of dominating possession, but it was Toronto who scored the crucial third of the game 18 minutes from time when Gilberto curled home a free kick from 25 yards out.
Wright-Phillips twice went close in the closing stages before his luck finally changed in the third minute of stoppage time when he hammered in Tim Cahill's pass to earn his side a draw in emphatic fashion.