Brooklyn ended a three-game losing streak and won on the road for the first time this year in five tries.
Phoenix took a 92-90 lead with 41 seconds to go in the fourth quarter on P.J. Tucker's 3-point shot. Johnson then tied it with 31 seconds remaining on Johnson's jumper.
Neither side had more than a three-point lead in overtime and Phoenix tied the score when Tucker made a dunk with 53 seconds left.
Brooklyn then turned the ball over and Phoenix had a chance to win it, but a 3-point try by Channing Frye with 3.9 seconds left bounced off the rim.
Johnson grabbed the rebound, drove the length of the court and floated up a layup between two Phoenix defenders.