Bayless scored 13 of his 17 points during the decisive fourth quarter in which the Grizzlies outscored the Suns 30-18.
Zach Randolph had another big game, finishing with 20 points and 15 rebounds and Ed Davis added 15 points and 11 rebounds for the Grizzlies.
Goran Dragic was the star for the Suns, scoring a game-high 33 points on 13-of-22 shooting from the field. Channing Frye had 14 points, P.J. Tucker scored 12 and Miles Plumlee added eight points, 12 rebounds and three blocks.
The Grizzlies led by 14 early in the second half and held a 57-44 lead at the 9:45 mark, but the Suns staged an 18-0 to take a five-point lead. The Suns entered the final quarter with a four-point lead, but the Grizzlies used an 11-0 to quickly seize back control of the game. The Suns cut the lead back to three with 6:45 to play, but the Grizzlies used a 10-3 run, capped by a Bayless three-pointer, to put it away.
The Grizzlies are now 14-17 while the Suns are 19-12.