The Raptors (25-13) closed out the fourth quarter on a 19-4 run to pick up their third consecutive home victory over Boston. The Celtics (23-15) saw their four-game winning streak end.
DeRozan also stepped up and collected 13 rebounds, including 11 defensive boards.
"He's a tough kid," Raptors coach Dwane Casey said. "More than anything else, the 41 points is nice, but 13 rebounds, the 11 defensive rebounds when we needed it.
"DeMar came in and got some big rebounds, tough rebounds, so that was impressive. That was more of a sign of grit and grind as much as the 41 points."
"You have to give (Boston) a lot of credit," said DeRozan, who shot 16 of 29 from the floor and 8 of 9 from the foul line.
"That's a hell of a team, a talented team, and they play extremely hard ... and we had to definitely bring our 'A' game against (them) ... and we did."
The Raptors, who trailed by as many as 16 during the third quarter, used a late 7-0 run to pull to within five.
A Thomas layup pushed the Celtics' lead to 84-80 to close out the third period.
Smart paced the Celtics with 14 points in the first half as Boston held a 55-46 lead at the break.
DeRozan had 10 first-half points, while Lowry added 10 points and five assists for the hosts.
The Raptors led 23-18 after one period, paced by six points and nine rebounds from Valanciunas.
"The fact that DeRozan was able to get into the teeth of our defense and make those tough shots, I think that's what took something from us," Horford said.
"Guys started stepping up. Valanciunas was in there cleaning stuff up and despite all that, I thought we were in a good position where we could have made plays.
"We just didn't make them down the stretch."