"He was taking the challenge. I took the challenge. We played a great game and he played a great game, and we won," Gallinari said.
The second-year forward from Italy matched shots -- and words -- with one of the NBA's biggest stars.
"Actually it was kind of fun for me to see him hold his ground and not back down," Anthony said. "He was kind of talking back to me out there, too, which I was kind of surprised."
Anthony scored 36 points and Chauncey Billups had 25 for the Nuggets, who lost their second straight and fell into a tie with the Dallas Mavericks for the No. 2 seed in the Western Conference playoffs. Their magic number for clinching a postseason spot remained at three.
The Nuggets had won the last four meetings -- Anthony scored a career-high 50 in the last matchup -- their longest winning streak ever against the Knicks. They seemed on their way to easily extending that run before the game changed after halftime.
Denver played its eighth game under Adrian Dantley since coach George Karl was diagnosed with throat cancer. Karl will not return until April, after the Nuggets have returned home from their five-game road trip. A source told ESPN.com's Chris Sheridan tt is unlikely Karl will return to coaching before the playoffs.
Anthony and Gallinari became involved in a sometimes testy back and forth midway through the third quarter, and the Knicks got the better of it. After Anthony's basket gave the Nuggets a two-point lead with 3:37 to go, Gallinari hit consecutive 3-pointers to ignite an 11-0 spurt to end the period. Harrington's 3 with 3.9 seconds left sent New York to the fourth with an 83-74 advantage.
Anthony wouldn't divulge what Gallinari said to him, but it was enough to get the officials to order the talking to stop.
"That's the challenge. That's basketball," Gallinari said. "Talking is a great part of basketball. If you don't talk in basketball, you cannot play basketball. You've got to talk."
Anthony scored 12 in the quarter, appearing he would get the better of Gallinari earlier in the period, when the Nuggets were going to their All-Star on every trip and he seemed amused and annoyed by the Italian's attempts to check him. He jawed at Gallinari after some of his baskets, but Gallinari gave as good as he got.
"You can see him clicking, taking the challenge," Knicks coach Mike D'Antoni said. "Now the challenge for him will be, he needs to be clicking every night and that's not who's in front of him. That's a little bit of, if he wants to go to that next level, then the game's got to be the challenge. It can't be, 'OK, I got Carmelo or Kobe or whoever.'"
The lead was still nine with 5:25 to play after Gallinari was fouled on a reverse and made the free throw, but six straight Denver points by Anthony made it 101-98 with 3:16 left. The Nuggets would twice get it to one on 3-pointers by J.R. Smith, but missed a chance to grab the lead when Anthony's drive bounced out with about 43 seconds to play.
Toney Douglas' jumper with 27 seconds remaining extended New York's lead to 107-104. Anthony had another drive spin out, Gallinari made two free throws, and the Nuggets misfired on some 3-point attempts.
Denver let one get away at the start of a difficult trip that includes stops at Boston, Orlando and Dallas.
"I think this is probably our most disappointing loss this season because it just means so much," said Billups, acknowledging the Nuggets had to win this one because of the difficulty of the remaining games on trip.
The Nuggets jumped to a 12-0 lead as the Knicks missed their first seven shots. The Knicks switched to a zone and fought back to trim it to 27-26 after one, despite shooting just 36 percent in the period.
Neither team led by more than six in the second, and Arron Afflalo's 3-pointer with 0.7 seconds remaining giving the Nuggets a 53-49 halftime lead.
The Knicks start their second five-game trip this month Friday in Phoenix, where D'Antoni visits his former team. New York went 2-3 on a trip from March 10-17. ... Hall of Famer Magic Johnson sat courtside next to former MSG Sports president Steve Mills, who left the Garden last summer to work for Magic Johnson Enterprises. It was Johnson who recommended Isiah Thomas to Mills when the Knicks were looking for a team president in 2003. ... Denver snapped a streak of three straight games without scoring 100 points.
Information from The Associated Press was used in this report.