The win allowed the Nuggets to earn a 2-2 season-series split with the Warriors, with each team winning once on the other's home court.
The victory also capped a 2-2 split for the Nuggets over a rugged six-day stretch in which they played the Boston Celtics, the San Antonio Spurs, the Oklahoma City Thunder and Golden State.
The Warriors, the league's winningest road team at 22-6, took their second loss in three games, giving them their first losing trip of three or more games since April 2015.
The Houston Rockets are the only other team with two wins this season over the Warriors, who have only 12 losses all year.
Golden State led 95-88 with 7:44 remaining before a three-point play on a dunk by Trey Lyles vaulted the Nuggets toward a 97-all tie with 5:29 to go.
The game was tied at 104-all before the Nuggets caught a huge break when the Warriors' Kevin Durant blocked a Gary Harris dunk attempt, with the ball bouncing right to Jokic at the 3-point arc.
The Denver big man buried the open 23-footer, giving the Nuggets the lead for good.
Will Barton had 25 points and Jokic 19 for the Nuggets, who began play Saturday in eighth place in the Western Conference, which would have positioned them to open the postseason against the Warriors had the playoffs begun this weekend.
Harris added 16 points, and Jamal Murray and Lyles 15 apiece for Denver, which improved to 21-7 at home. Lyles completed a double-double off the bench with a game-high 10 rebounds.
The Nuggets won the game with big advantages in 3-point and free-throw shooting, two areas in which the Warriors led the league entering the game. Denver outscored Golden State 36-24 on 3-pointers and 25-14 at the foul line.
Durant poured in a game-high 31 points for the Warriors, who were playing the second half of a back-to-back, having won at Sacramento on Friday night. Stephen Curry scored 24 points.
--Field Level Media
Golden State | Denver | |
Kevin Durant 31 | Scoring | Will Barton 25 |
Draymond Green 8 | Assists | Nikola Jokic 5 |
Zaza Pachulia 8 | Rebounds | Trey Lyles 10 |
Kevin Durant 7 | Free Throws Made | Jamal Murray 7 |
Stephen Curry 2 | Steals | Nikola Jokic 2 |
JaVale McGee 4 | Blocks | N/A |
Team | Points | FG% | 3PM-3PA | FTM-FTA | Assists | Rebounds | Blocks | Steals | Turnovers |
Golden State | 108 | 50.0 | 8-31 | 14-23 | 28 | 42 | 10 | 9 | 14 |
Denver | 115 | 42.9 | 12-29 | 25-29 | 28 | 48 | 0 | 7 | 16 |