With the NBA's second-leading scorer Carmelo Anthony (knee) and starting point guard Raymond Felton (finger) both sidelined, Smith rescued the Knicks and helped them rebound from their Christmas Day loss to the Los Angeles Lakers.
The game was tied 97-97 in the final seconds when Smith took an inbounds pass from Jason Kidd, and, without dribbling and while fading to his left, nailed a long jump shot over the hand of an outstretched defender.
"I just tried to get my shoulders square to the basket and let it fly," Smith told reporters after being swamped by his team mates on Phoenix's home floor.
"They tried to deny the ball. Fortunately, Kidd made a great bounce pass."
The buzzer-beater was Smith's second of the season and helped him finish with 27 points after he had also tied the game at 97-97 with a tough jumper about 10 seconds prior to his winning bucket.
The win improved the resurgent Knicks to 21-8, the second best mark in the Eastern Conference.
Jared Dudley scored a career-high 36 points in the loss for the Suns (11-18).
The San Antonio Spurs took advantage of Toronto's injury woes to snap the Raptors' five-game winning streak with a 100-80 victory.
San Antonio got a balanced attack, with all 12 of their players registering points, as they systematically broke down the visiting Raptors and ended Toronto's best stretch of the season.
Tim Duncan led the way with 15 points, Manu Ginobili added 14 off the bench and the Spurs (22-8) stretched their Southwest Division lead to two games over Memphis with the win.
None of Toronto's (9-20) starters reached double-figures in scoring.
The Raptors had managed to string together a succession of victories prior to Wednesday's game despite missing center Jonas Valanciunas, who broke his finger last week, and guard Kyle Lowry and forward Andrea Bargnani through injury.