The win is the Heat's 18th in a row against Western Conference opposition.
The teams were level at the break, but Xavier Henry led the Lakers' charge as the hosts opened up a 13-point advantage.
Paul Pierce thought that he had done enough to give the visitors the win, hitting a three-pointer with just over 16 seconds left to play, but Evan Turner sprinted down the other end of the court to add the winning basket.
A late rally helped the Charlotte Bobcats come from behind to beat the Detroit Pistons.
The visitors had trailed by 20 points during the second quarter, and were 14 down at the start of the fourth, but Al Jefferson upped his game, adding 15 points in the final 12 minutes to lead the Charlotte comeback.
The home side were 11 points up at the end of the first quarter, but Toronto fought back, before DeMar DeRozan added the winning shot late in overtime.
Markieff Morris recovered from a second-quarter mistake which saw him briefly benched to finish the game with 25 points as the Suns overturned a 21-point deficit.
The teams were level at the break, and matched each other's scoring in the third and fourth to ensure overtime, but Kyrie Irving, who missed practice earlier this week with the flu, made four free throws inside the last 30 seconds to seal the win.
Results in full: Brooklyn Nets 120-121 Philadelphia 76ers, Utah Jazz 85-118 Atlanta Hawks, Milwaukee Bucks 111-114 Cleveland Cavaliers, Charlotte Bobcats 116-106 Detroit Pistons, Sacramento Kings 103-122 Miami Heat, Houston Rockets 81-114 Indiana Pacers, Toronto Raptors 109-108 Dallas Mavericks, Phoenix Suns 103-99 Denver Nuggets, Minnesota Timberwolves 91-104 Los Angeles Lakers