Barnes, who also scored 41 points on Oct. 30 against the Orlando Magic, had a double-double with 10 rebounds.
Immanuel Quickley added a double-double with 18 points and 14 assists as Toronto (8-11) won back-to-back games for the first time since the first two games of the season.
Collin Murray-Boyles came off the bench for 18 points and played stiff defence in the final quarter.
The Raptors were still without Kawhi Leonard (left knee swelling) and RJ Barrett (mild right hamstring strain), both of whom are starters when healthy. Toronto will issue an update on Leonard’s condition on Tuesday.
Nikola Jokic scored 24 points and pulled down eight rebounds for Denver (11-7). Jamal Murray of Kitchener, Ont., had 18 points and four assists.
Nuggets: A well-rounded attack with six Denver players reaching double digits in points made it difficult to slow down its offence. A slow start from three-point range that saw the Nuggets only make 3-of-13 (23.1 per cent) shots from beyond the arc made the game closer than it should have been. Denver finished the game seven for 30 (23 per cent) on threes.
Raptors: Failed to make the most of the limited periods when Jokic and Murray — both MVP candidates — were off the court. Toronto did have a good shooting night, making 43 of 77 (56 per cent) field goals.
Barnes dropped a three-pointer with 3:59 left to play to cap a 7-0 Raptors run for a 108-101 lead. Barnes had five of those seven points.
It was Barnes’s 22nd game with 30 or more points, tying Leonard for seventh most in Toronto history.
Nuggets: Visit the Detroit Pistons on Monday.
Raptors: Visit the Houston Rockets on Tuesday.