Wilson Chandler blocked Josh Smith's drive to the hoop with 1.7 seconds to play and the ball bounced out to Horford in the lane. Referees originally ruled his short jumper good, but replay clearly showed the light was on above the backboard with the ball still in Horford's hands.
"Chandler just made a great play, came with the block," Horford said. "So by the time I caught the ball, your instinct is just to shoot the ball. I wasn't aware of the clock. I didn't know what was going on. I just threw it up there. Obviously you know it wasn't good."
Danilo Gallinari scored 27 points and David Lee had 19 points and 13 rebounds for the Knicks (22-41), who won for just the third time in 15 games and temporarily avoided a franchise-record ninth straight losing season.
Gallinari was 4 of 5 from 3-point range and showed an aggressiveness that was frequently been missing in the second half of the season.
"He was the star of the game. He did an unbelievable job for us. He did a great job forcing
Smith had 25 points, 10 rebounds and six assists for the Hawks, who have lost two straight following a four-game winning streak. Johnson scored 22 points and Horford finished with 18 points and 12 boards.
Atlanta fell a game behind Boston for third place in the Eastern Conference, and could come back to regret its surprisingly poor play against the Knicks. New York beat the Hawks for the third time in a row, having handed them two of their seven losses at home this season.
"We should have dominated this series but they match up well and [Mike] D'Antoni's a great coach," Smith said.
Smith's basket with 27.5 seconds left cut New York's lead to one and he had another chance after Toney Douglas turned it over. Former Knicks guard Jamal Crawford pushed it up the floor and found Smith cutting to the hoop, but Chandler rose to stop one of the NBA's high flyers.
"It was kind of like a panic play almost," Chandler said. "I'd seen Jamal drive so I just rotated basically, just by instinct."
Al Harrington scored 14 points and Douglas added 11 for the Knicks, who bounced back from a humiliating loss to New Jersey on Saturday by going 10 of 15 from behind the arc. They did it without Tracy McGrady, who was resting because of general soreness.
He'll probably be back sometime on the Knicks' five-game road trip starting Wednesday at San Antonio while the Big East has Madison Square Garden for its conference tournament.
Douglas snapped a 68-all tie with a 3-pointer with 1:23 left in the third quarter, and Harrington hit another as New York took a 76-70 lead to the fourth. Gallinari drilled another 3 a minute into the final period, and the Knicks led by 10 after Chandler's 3 with 5:27 to go.
Atlanta used an 11-2 spurt, mostly on free throws, to get within 97-96 with 2:53 remaining. Neither team could score again until Harrington's jumper gave the Knicks a three-point cushion with 50.5 left, and New York had just enough to hold on.
"We're just not matched up well with the Knicks for some reason," Hawks coach Mike Woodson said. "We played well enough to win tonight, but we were our own worst enemies down the stretch."
Two nights after setting an NBA record by missing all 18 3-point attempts in its 113-93 loss to New Jersey, the Knicks were 4 for 4 in the first quarter, shooting 61 percent overall as the teams played to a 27-all tie. Atlanta took a 46-44 lead into halftime after Horford's short jumper with 42.5 seconds left.
- Headed for free agency in July, Johnson gave the Hawks and Knicks hope they could sign him. He said he couldn't go back to a losing situation and there was a "good chance" he'd stay in Atlanta, where the Hawks have "a great thing going." He also praised D'Antoni, whom he played for in Phoenix. "We got great history together," Johnson said, adding his career took off under D'Antoni.
- The Hawks were scheduled to be off until Saturday, but will visit the Wizards on Thursday to make up the Feb. 6 game that was postponed because of severe weather conditions in Washington.
- Before coming to the arena, Hawks Hall of Famer and broadcaster Dominique Wilkins stopped by the NBA Store, where he joined Panini, the league's official trading card partner, in launching "Adrenalyn," an interactive basketball-themed trading card game for kids.