Warrington staged a second successive second-half comeback to keep alive their engage Super League play-off hopes and leave Wigan still looking for their first win at the Halliwell Jones Stadium.
The Wolves came from 16-6 down to win at Hull a week ago and this time out they again finished the stronger team to secure a sixth successive home win over their derby rivals.
Warrington went in front for the first time when Chris Riley scored on 57 minutes and Australian scrum-half Michael Monaghan recovered from a heavy knock to score the clinching try 10 minutes later.
The victory was especially sweet for Warrington duo Richard Mathers and Mickey Higham, playing against their old club for the first time, but there was no happy return for England centre Martin Gleeson.
The Wolves have now won four of their last five games but looked anything but likely victors after experiencing a torrid opening to a thrilling error-strewn match.
Wigan were forced into wholesale changes following the loss of George Carmont and Phil Bailey through injury and the temporary return to Australia of Tim Smith on compassionate leave.
The changes paved the way for the return of youngsters Shaun Ainscough, Super League's leading tryscorer, and Sam Tomkins and both were heavily involved in the opening stages dominated by the visitors.
They gained possession from Pat Richards' booming kick-off and enjoyed six consecutive sets after Warrington twice blocked kicks on the last tackle.
It was eight minutes before the Wolves got their hands on the ball and by then they were relieved to be only 6-0 down.
Centre Cameron Phelps got the early try, courtesy of Sam Tomkins' grubber kick which the visitors failed to block and there were other close shaves.
Second rower Joel Tomkins got over the line only to be prevented by Mathers from grounding the ball and winger Amos Roberts had a try disallowed by video referee Ian Smith for a knock-on in the build-up.
Warrington, who sent on Paul Wood for his 200th appearance midway through the first half, gradually worked their way back into the game, with the aid of some Wigan generosity.
Gleeson and Wigan captain Sean O'Loughlin both came up with errors inside their own 20-metre area which put their side under pressure and they enjoyed an escape when winger Matt King narrowly failed to take Lee Briers' high kick to the corner.
However, King made amends five minutes before half-time when he leapt above Ainscough to touch down another accurate "bomb" by Briers.
The try was too far out for Chris Bridge to add the goal, leaving Warrington trailing by two points at the break.
It was just as tense and tight in the second half, with little to choose between the sides.
Wigan stretched their lead to 8-4 on 51 minutes with a Pat Richards penalty but the re-introduction of skipper Adrian Morley breathed new vigour into Warrington's display.
And the home side drew level after running a penalty from in front of the posts when Mathers got the ball out to Grix and he went round Roberts to get winger Riley over at the corner.
Bridge added the touchline conversion to put his side in front for the first time and added a second goal after Monaghan jinked his way over on 66 minutes.
Grix had a second try disallowed as Warrington dominated the final quarter.