Davis ended with 31 points, scoring his team's last 10 in contributing a 22-point second half as the Lakers defied yet another Denver comeback.
The Nuggets trailed by as many as 16 points before Nikola Jokic took control by scoring 11 straight Denver points, including a basket that put his side up 103-102 with 20 seconds left.
In a frantic finish, LA's Alex Caruso missed a three-pointer, before a shot from Green was blocked out of bounds with 2.1 seconds left.
Rajon Rondo then found Davis near the sideline, and the All-Star forward found the basket from long-range.
"Special moment for a special player. Happy to be a part of it," said James.
Jokic had 30 points and nine assists for the Nuggets while Jamal Murray had 25 points.
Game three is on Tuesday night.