Gallinari had missed two games through illness but with the regular season resuming after the All-Star break, his 26 points, laced with four three-pointers, helped the Nuggets snap a three-game losing streak.
With the game tied 84-84 midway through the fourth quarter, Gallinari drained his final three-pointer and the home Nuggets rode the momentum with a 10-2 run that put them in position to close out the win.
Ty Lawson matched Gallinari's 26 points while Kenneth Faried added seven points and 16 rebounds for Denver (34-21).
"I'm just attacking, not thinking about whether I should shoot it, not second-guessing my shot," Lawson, who has averaged 27.5 points in his last four games, said.
"I'm just trusting myself and it's been working out for me."
The Celtics (28-25) had won seven of eight games since the loss of Rajon Rondo to a season-ending knee injury but once they fell behind in the final quarter, they were unable to stay in touch with the Nuggets.
Jeff Green lead Boston with 20 off the bench and Avery Bradley added 17.
The Celtics had a chance to mount a late challenge when they trailed 94-90 and had possession of the ball, but Kevin Garnett could not convert his shot from the paint.
"We got stagnant with ball movement," Boston's Paul Pierce said. "We just didn't make the adjustment."
Denver also welcomed the return of Andre Iguodala from injury but he did not fare so well, missing all seven of his field goal attempts.