Reggie Evans, who began the night fourth in the league in rebounding at 11.5 per game, pulled down 14 for the Raptors, who improved to 3-9 and snapped a two-game losing streak. Jose Calderon chipped in 12 points for Toronto.
"I didn't think we had respect for the game against Washington," said Evans, who had five offensive rebounds. "A lot of peers paved the way for us in this league. We got an F [on Tuesday] night. I think we got a much higher grade here and played with the type of energy we need to be successful."
Elton Brand led the Sixers with 27 points, Jrue Holiday added 17 and rookie Evan Turner had his second double-double with 11 points and a career-best 12 rebounds. Thaddeus Young scored 10 points for Philadelphia (2-10), which has dropped five in a row.
The Sixers played without starting guard Andre Iguodala for the fourth time in the last six games because of tendinitis in his right Achilles.
"We've got to get it together," Turner said. "Sometimes you try to trust each other, but sometimes you just have to play without thinking."
Toronto went ahead 87-85 on a short turnaround jumper by Bargnani with 2:22 left. After Turner hit 1-of-2 from the foul line, Weems converted a layup for an 89-86 advantage with 1:25 remaining.
Weems added the first of two free throws with 49.6 seconds left to give the Raptors a four-point cushion at 90-86.
"That was a big win," Calderon said. "The defensive intensity was there at the end. We were much more aggressive in this game than we were against Washington. It was like we were a different team. It was nice to see us bounce back like that."
The game was close throughout most of the fourth quarter.
Brand stole the ball and went the length of the floor to give the Sixers an 85-83 lead, but Bargnani came right back with a driving layup to tie the game with 3:05 remaining.
Bargnani scored 18 points in the first half to help the Raptors take a 47-46 lead into the break.
Bargnani's 3-pointer in the first quarter helped extend Toronto's streak to 954 consecutive games with at least one shot converted from beyond the arc. The Raptors started the streak on Feb. 26, 1999. ... Evans had 10 rebounds at halftime for Toronto. ... The Sixers were just 1-for-8 from 3-point range.