Ray Allen scored 17 points for the Celtics, who blew a chance to tie Atlanta for third place in the Eastern Conference. Kevin Garnett and Kendrick Perkins each added 14 for Boston, which botched its final possession and couldn't get a tying 3-point attempt off in the final seconds.
The Celtics followed their victory over Cleveland on Sunday by losing for the fourth time in five games after leading early in the fourth quarter behind a spark from former Knicks guard Nate Robinson.
Gallinari scored 19 points in the third quarter to give the Knicks an 86-78 lead, but Robinson hit a 3-pointer and assisted on Glen Davis' jumper in the Celtics' 10-0 run to start the fourth that gave them an 88-86 advantage on Michael Finley's 3-pointer.
Robinson hit another jumper for a one-point lead midway through the period, and it stayed tight from there. Gallinari banked in a long jumper — originally called a 3-pointer but overturned after replay — for a 102-101 lead with 36 seconds left
Chris Duhon came up with a steal and set up Lee's basket that made it 104-101 with 7.3 seconds to play. The Celtics called time but took way too long to swing the ball to the opposite side of the court, where Rasheed Wallace caught it too late to get off a shot.
With Tracy McGrady (sore left knee) and Al Harrington (sore left ankle) joining Wilson Chandler (sore left groin) on the injured list, the Knicks had to look deep down the bench for scoring. They found it in Barron, a 7-foot center who signed last week from the NBA Development League and was playing his second game with New York. He hadn't started in the NBA since making 15 starts for the Miami Heat in 2007-08, but shot 8-of-13 and spent all night chasing down missed shots against Boston's frustrated front line.
Robinson was perhaps the Knicks' most popular player for the last five years before he was dealt to Boston at the trade deadline. Celtics coach Doc Rivers said he still considers the 5-foot-9 guard the Celtics' X-factor heading into the playoffs, but he benched Robinson on Sunday after playing him only nine minutes in the previous game.
However, he said before the game Robinson would play Tuesday, in part because other Boston players wanted to see Robinson get in.
Robinson checked in — or tried to, anyway — with about 3 1/2 minutes left in the first quarter to polite, but hardly enthusiastic applause. He was sent off the court because he was replacing Rajon Rondo, who was shooting a free throw, and had to wait until the next dead ball to officially enter.
The Knicks led throughout most of the first quarter and were ahead 27-21 when it ended. Boston shot 63 percent in the second, briefly grabbing the lead late in the period before New York took a 53-52 edge into halftime.
Though Mike Krzyzewski has repeatedly said he's not interested in leaving national champion Duke for the NBA, Knicks coach Mike D'Antoni won't rule out coaching against him someday. D'Antoni is Krzyzewski's assistant on the U.S. Olympic team. "He's still only 62 years old. He's young, so I have no idea what he would do," D'Antoni said. "Wherever he goes, I do know that he would be successful, if he's coaching or running a business or whatever he wants to do. He's just pretty special." There have been reports this season that the New Jersey Nets would pursue Krzyzewski. … Knicks president Donnie Walsh said he wasn't sure if he will sign anyone with the Knicks' available roster spot. The spot opened Monday when the Knicks waived Cuttino Mobley, who retired last season because of a heart condition. The Knicks had to waive him before the end of the season to save the luxury tax on his salary.