Yunel Escobar hit a solo homer, finished with three hits and scored twice, including the winning run.
The Phillies have lost 11 of their last 14.
After Toronto scored three times in the eighth to make it 5-all, Escobar drew a leadoff walk in the 10th from Joe Savery (0-2). Escobar moved up on a balk, advanced to third on Mike McCoy's groundout and scored when Davis hit a drive that hopped over the left-center field wall.
By baseball's official scoring rules, Davis was credited with a single, even though balls bouncing over walls most often are ground-rule doubles. Since Escobar only had to advance one base to score, Davis' hit went as a single.
The Blue Jays' late rally cost Lee his first win of the season. The Phillies ace allowed five runs and 12 hits in seven-plus innings.
Lee has not won since a 4-2 win over Atlanta on Sept. 26, 2011, in his final start of the regular season. Lee then lost his only postseason start last year, a 5-4 defeat to St. Louis on Oct. 2.
Francisco Cordero (2-4) pitched one inning for the victory.
John Mayberry Jr. hit a three-run homer, but Philadelphia's 14th error in 10 games proved costly.
The Phillies opened the scoring in the first on back-to-back doubles by Placido Polanco and Hunter Pence off Ricky Romero. Toronto tied it in the second on Escobar's fourth homer.
Philadelphia reclaimed the lead with a two-out rally in the third. Shane Victorino and Ty Wigginton hit consecutive singles and Mayberry followed with his fourth home run.
The Blue Jays cut it to 4-2 in the bottom half when Davis singled, stole second and scored on a two-out base hit by Colby Rasmus.
Philadelphia made it 5-2 with a run in the eighth off reliever Robert Coello. Brian Schneider and Michael Martinez drew back-to-back walks and Jimmy Rollins followed with a ground-rule double to right, with Martinez forced to stop at third.
The Blue Jays scored twice and chased Lee before an out was recorded in the bottom half. Jose Bautista led off with a walk and advanced to third on Edwin Encarnacion's single to left. The relay came to Rollins, whose ill-advised throw to second sailed into right field, allowing both runners to score.
Chad Qualls came on for Lee after Kelly Johnson followed with a single. Escobar popped out but pinch-hitter David Cooper snapped an 0-for-18 slump by chopping a single through the right side, sending Johnson to third. J.P. Arencibia followed with an RBI double down the third base line, snapping an 0-for-13 slump.
Romero allowed four runs and seven hits in six innings.