LOS ANGELES (AP) - Kyle Kuzma added 18 points for the Lakers' fifth win in six games.
Kuzma's layup tied the game at 104-all with 1:34 to go.
Kent Bazemore was called for a technical at the end of that play and Kuzma made the free throw for a 105-104 lead.
Vince Carter dunked to put the Hawks back up 106-105.
James got fouled at the other end and missed both. But the Lakers got the offensive rebound and Kuzma charged into the paint amid three defenders for a shot from the left side. It missed.
James was waiting on the right, dunking for a 107-106 lead.
Taurean Prince led the Hawks with 23 points, Bazemore added 21 and Trae Young had 20 for Atlanta, which still has just one road win on the season.
Alex Len's dunk started a 7-0 run that put Atlanta ahead 102-98 in the fourth.
James' basket drew the Lakers within one, but then he missed two long jumpers on the same possession.
The Hawks trailed by nine to start the fourth. Their first three baskets in the fourth came on 3-pointers by Prince (two) and Young (one).
The Lakers dominated the third, outscoring Atlanta 32-22 to take an 84-75 lead into the fourth.
But Atlanta kept coming, hitting three consecutive 3-pointers to start the fourth when James was on the bench for the Lakers.
Len's dunk gave the Hawks a 99-98 lead, just the second time they led in the second half.
James' dunk that tied the game midway through the second quarter got started with Rajon Rondo. He tossed up an alley-oop pass that Brandon Ingram batted back as he ran out of bounds to a trailing James, who provided the thunderous finish.
The Hawks raced to a 9-0 lead to start the game, their largest lead of the night. The Lakers missed their first three shots and Ingram committed two turnovers.
Hawks: They haven't beaten the Lakers at Staples Center since March 4, 2016. ... Prince was called for a flagrant-1 foul on James in the first quarter. ... C Dewayne Dedmon wasn't with the team while awaiting the birth of his first child.
Lakers: James earned his 768th career victory, overtaking Reggie Miller for 21st on the NBA's all-time victories list. ... They've won five in a row against the Hawks and are 24-5 against them at home since 1991.
Hawks: Visit Golden State on Tuesday.
Lakers: Host Portland on Wednesday. The teams split their first two meetings.