Eric Hassli put Toronto (5-17-7), vying for its MLS win in nearly two months, ahead in the 58th minute. It was the French striker's second goal in two games and his third in six outings since joining Toronto from Vancouver.
Williams tied it 27 minutes later as Philadelphia (7-13-6) took advantage of some sloppy play by the opponents. Toronto was unable to clear a low cross from Antoine Hoppenot through the penalty box, and the ball went through a sea of legs until Williams tapped it in for only his second goal in 63 career games.
Both teams remained in dire need of a win, as Toronto fell to 0-6-3 since defeating Colorado 2-1 on July 18 and Philadelphia dropped to 0-3-4 since beating New England 2-1 on July 29.
Toronto manager Paul Mariner had challenged his team to show its character after a 2-1 loss to visiting Chicago that eliminated the team from playoff contention for the sixth straight year.
Toronto responded Saturday, outplaying Philadelphia but unable to make that advantage pay until the 58th minute. Luis Silva, who was lively all game and set up the score, could have had two goals in the first half himself if he had been on target.
But any positives disappeared with the late goal from Philadelphia.
Terry Dunfield and forward Ryan Johnson returned to the Toronto lineup from international duty but fullback Ashtone Morgan was forced to sit out due to accumulation of yellow cards.
Union goalie Milos Kocic, whose wife gave birth to triplets last Sunday, showed good anticipation in the 17th minute, coming out quickly to clear the ball ahead of an onrushing Danny Cruz. Five minutes later, Hassli's cross was cleared away at the last moment as Dunfield and Silva waited in front of the goal.