Terms of the deal weren't disclosed but The Denver Post reported the 23-year-old Italian will earn close to $42 million over the duration of the deal.
Gallinari inked the deal as Wednesday's NBA deadline approached for negotiating extensions with members of the NBA Draft Class of 2008. Players who do not reach agreement by the deadline can become restricted free agents beginning July 1.
"Gallo has been excellent and done everything we have asked since we made the trade last February," Nuggets Executive Vice President of Basketball Operations Masai Ujiri said. "Everybody is seeing how talented he is, and he's only 23 years old. He is only going to get better."
Gallinari is the Nuggets' leading scorer at 17.4 points per game, shooting a career-best 46.2 percent from the floor this season.
Trader Joe's: Car crashes into Long Island store, injuring 11
Selena Gomez drops F-bomb, walks off stage during Jingle Ball performance