Robinson scored 21 points, Al Harrington added 20, including the tiebreaking 3-pointer with 1:23 left, and the Knicks beat the Celtics 108-103 in an exhibition game Tuesday night.
David Lee had 19 points and 16 rebounds, and Gallinari had his strongest outing of a poor preseason with 18 points for New York (4-2).
"I think that we played a really good game," Gallinari said. "It was important for us because the first time we played against Boston up there, we lost. It was an important game for us even if it was just preseason."
Rajon Rondo scored 20 points for the Celtics (5-2), who had reserves on the court down the stretch of a game that was close throughout. One of them, Marquis Daniels, finished with 17 points.
"A lot of good things. Some bad things," said Rivers, who praised the play of his second unit. "They scored too many points. We're going to score. We don't like giving up that many points."
Just like their 96-82 loss in Boston on Oct. 9, the Knicks shot miserably at the start, missing 11 of their first 12 attempts. They rallied to tie it at 26 after one, but the Celtics went back ahead in the second and took a 62-59 halftime lead behind 14 points from Rondo.
"They're a very good team and a lot of times it takes a couple of minutes in a game to get adjusted, because I mean you're going against Kevin Garnett, Rasheed Wallace, Paul Pierce, Ray Allen, and Rondo's pushing the ball," Lee said. "So it takes a minute to get adjusted, but after we got adjusted to that we were able to hit them back and got a little bit of a run ourselves and go from there."
Daniels tied it for the final time with two free throws with 1:40 remaining before Harrington nailed his 3-pointer. Robinson followed with a layup after a turnover to make it 108-103 with 1:18 to go, and the Celtics' backups kept misfiring from there.
Robinson, back in a reserve role after a couple of preseason starts, had 16 points in 16 first-half minutes.
"My job is to come in and get these guys fired up," Robinson said. "That's been my identity since my rookie year and that's just something I've been trying to do."
New York had struggled offensively throughout the preseason, shooting 38 percent and averaging 96 points while too often settling for jumpers in its first five games. The Knicks still hit only 44 percent in this one, but were able to play at the pace they want to much more than in previous games.
Up two after the third quarter, the Knicks scored nine straight points early in the fourth to open a 98-90 lead on Wilson Chandler's jumper. The Celtics answered with an 11-1 surge, with Daniels scoring the final four points for a 101-99 lead with 3:36 remaining, and it stayed close from there.
"We're still getting our execution plays, getting our plays down," Wallace said. "It's not going to happen overnight but we're cool."
The Knicks close their exhibition schedule Wednesday night at New Jersey. The Celtics face the Cavaliers on Wednesday in Columbus, Ohio, then return to Ohio next Tuesday to visit the Cavs for the NBA season opener.