The Lakers had a three-game winning streak snapped, a run of success that had followed 10 losses in 12 contests.
Los Angeles led by as many as 11 points in the fourth quarter and still had a seven-point advantage midway through the period.
Beasley then started the late Phoenix surge and he eventually put the Suns in front at 84-82 by making a jumper with 2:32 remaining.
Kobe Bryant scored the last of the Lakers' points with 1:07 to go that again tied the game, but Beasley's layup with 43 seconds left gave Phoenix the lead for good. Luis Scola and Jared Dudley finished off the game with a pair of free throws each.
Beasley made 12-of-20 shots and scored 27 points in helping the Suns end a two-game skid. Scola and Marcin Gortat added 14 points each.
Bryant scored 17 points with nine assists and Metta World Peace had 15 points for the Lakers.
Wisconsin business offering 'therapeutic cuddling' forced to close
Campus cop fatally shoots Texas student during traffic stop