The Ducati rider bounced back from his crash on Saturday at the Aragon circuit, when he slid off on the penultimate lap to hand victory to the Northern Irishman.
Davies made no mistake second time around as he won his duel with the reigning champion, nudging home half a second clear of Rea, with Ducati team-mate Marco Melandri in third.
Rea's second place was still enough to extend his lead in the championship standings to 50 points, with the Kawasaki rider looking set to become the first rider in history to win three straight World Superbike titles.
Spain
World champion Rea powers to first victory in Jerez
21/10/2017 AT 12:06
Rea's Kawasaki team-mate Tom Sykes finished in fourth place after a weekend blighted by sickness, pipping Dutchman Michael van der Mark into fifth place on his Yamaha.
But there was disappointment for Alex Lowes, who had started race two at the front of grid but made a mistake to slide off the track and, despite recovering, had to settle for 13th place.

Thrilling finish as Davies pips Rea in Aragon

Davies hailed his first win of the season, telling worldsbk.com: "The whole weekend has been pretty much a disaster until the last lap of the second race - the only moment of joy has been bringing home the win.
"It was a hard-fought battle - the wind was crazy and we were getting blown left, right and centre. I'm very happy with the 25 points and I'm looking forward to the next one."

Chaz Davies: 'Perfect end to a disastrous weekend'

Rea also expressed relief that he had emerged from a difficult weekend unscathed, having cemented his championship challenge on a track with which he has always struggled to cope.
"It's been a good weekend for us, coming to a track we know is notorious for both me and the bike," Rea said. "If you'd offered me 50 points at the start of the week, I'd have shook your hand."
Spain
Melandri fastest in final practice in Spain
21/10/2017 AT 09:21
Spain
Chaz Davies: 'Perfect end to a disastrous weekend'
02/04/2017 AT 12:44