The Suns ended a seven-game losing streak in a dramatic contest that saw both teams struggle to score down the stretch.
Memphis tied it at 76-76 with 5:43 to play and the clubs combined to miss eight of their next 11 shots.
Rudy Gay missed a jumper with 8 seconds left that would have given Memphis the lead and that led to Dragic's layup
Memphis lost its second in a row after winning 14 of its first 17 contests this season.
Shannon Brown and Jared Dudley scored 15 points each to lead the Suns, who had not won since a 13-point decision over Cleveland on Nov. 27. Five of the seven straight losses had come on the road and this was the second encounter in a five-game homestand.
Gay had 21 points and 11 rebounds for the Grizzlies. Zach Randolph added 18 points and 10 boards.
Couple mistakenly served bag of cash at McDonald's drive-thru
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need