Warriors guard Stephen Curry had seven of his 16 points in the fourth quarter, and he added nine assists and eight rebounds.
Golden State (9-6) blew a 15-point lead but still managed to snap a three-game losing streak.
The Pelicans (6-8) were led by forward Ryan Anderson’s 21 points, but they couldn’t convert on their final possession.
Guard Eric Gordon scored 16 points, but he missed a 3-pointer from the left baseline in the final seconds.
Guards Anthony Morrow and Jrue Holiday hit consecutive 3-pointers to put New Orleans on top 85-83 with 8:52 left, but Curry and forward Harrison Barnes responded with 3-pointers of their own to put Golden State back ahead 89-85.
O’Neal hit a short baseline jumper over Holiday on a switch, and Thompson nailed a 3-pointer from the left baseline for a 98-93 Warriors lead with 3:09 left.
The Pelicans closed within 100-99 with 2:25 remaining on a layup and foul shot by Anderson, but O’Neal came up with a loose ball off a block by Gordon and hit a put-back with 2:08 left to give Golden State a 102-99 edge.
Davis rebounded an Evans miss for a dunk that drew New Orleans within 102-101 with 47 seconds left, and the Pelicans forced O’Neal to miss on the other end.
Gordon’s 3-pointer from the left baseline rolled around the rim but refused to fall, giving Golden State the victory.
NOTES: Warriors C Andrew Bogut served his one-game suspension for his part in a scuffle with the Portland Trail Blazers on Saturday. Warriors F Andre Iguodala (strained left hamstring) was not expected to play during the entire trip, which ends Sunday. ... Warriors C Ognjen Kuzmic underwent successful surgery on his right hand. He is expected to be out for a minimum of six weeks.