The Nets claimed a second straight win on Sunday, with O'Neale's three-pointer with less than 30 seconds left on the clock nosing them into a two-point lead.
Kyrie Irving, the team's talisman in the absence of the injured Kevin Durant, scored two free throws with 14 seconds remaining to seal a 120-116 comeback victory at the Chase Center.
Golden State had been leading 106-93 midway through the final quarter on Sunday, and O'Neale hailed the Nets' attitude and self-belief.
"There's a lot of confidence going around," O'Neale told reporters.
"Everybody's taking the challenge, stepping up, finding out ways to win games."
Irving was key, teeing up O'Neale's crucial three-pointer to cap a ninth assist of the game. He finished with 38 points and seven rebounds.
"Kyrie had been getting to the basket, hitting tough shots and at that moment, he drove, two people double-teamed and he found me open," O'Neale said.
"I just needed to have the confidence to knock it down."
Irving added: "They did a great job of staying on my body, keeping the game physical, making it tough.
"I felt like my team-mates had a lot of great looks, drawing the defense to lose their man.
"Royce being wide open, I felt like that was the best shot for our team, so I gave up the ball, trusted him to make it and luckily it went in."
The Nets are fourth in the Eastern Conference, while the Warriors – reigning NBA champions – are down in 10th in the West after suffering a sixth loss from their last nine games.
Kevin Durant, who finished with a game-high 35 points, missed his turn-around jumper but O'Neale was on hand with a tip-in to help the Nets snap their two-game skid.
Durant went 13-of-22 from the field with eight rebounds, three assists and a block, clocking up his 26,000th career NBA point along the way, becoming the 19th player to achieve that feat.
The Nets got strong contributions off the bench as Yuta Watanabe added 20 points with seven rebounds, while Ben Simmons had a double-double with 15 points, 13 rebounds and seven assists.
Game-winner O'Neale, who was in the starting line-up, had 11 points, 10 rebounds and 11 assists for the game.
The victory comes after Durant's stinging public criticism of the Nets' starting quality in the continued absence of the suspended Kyrie Irving, who may return for Sunday's game with the Memphis Grizzlies.
Damian Lillard top scored for Portland, who fall to 10-5, with 25 points along with 11 assists. Anfernee Simons added 24 points and Jusuf Nurkic had 17, including a three-point play to tie the game up with 6.5 seconds to go.
Kawhi returns as Clippers shoot down Pistons
Kawhi Leonard had minimal impact on his return after 12 games out as the Los Angeles Clippers rallied from a 12-point deficit to win 96-91 over the Detroit Pistons.
Leonard scored six points with five rebounds and four assists after not playing since October 24 due to knee stiffness. The two-time NBA Finals MVP, who was in the starting lineup, shot two-of-eight from the field.
Reggie Jackson scored a team-high 23 points in a low-scoring game, while Ivica Zubac pulled down 18 rebounds with nine points.
Kings remain hot as Fox fires
The Sacramento Kings improved to 8-6 with their fifth straight victory, winning 130-112 over the San Antonio Spurs.
De'Aaron Fox scored a team-high 28 points on 11-of-15 shooting along with eight assists, while Malik Monk added 26 points off the bench. Spurs guard Devin Vassell top scored with 29 points, including four triples.
The Kings' five-game win streak is their first since the 2020-21 season, while it comes after they started the season 0-4, winning eight of their past 10 games.