Wigan (6) 16
Tries: Riddell, Tuson, Richards Goals: Richards 2
Warrington (10) 23
Tries: Hicks, Myler, Atkins, Westwood Goals: Westwood 3 Drop-goals: Briers
Wigan celebrate Mark Riddell's opening try, but Warrington came back to win
Warrington overcame a sluggish opening to beat Wigan and cut the gap at the top of Super League to two points.
An error-strewn start from the visitors allowed Wigan to take a 6-0 lead but tries from Chris Hicks and Richie Myler gave the Wolves a 10-6 half-time lead.
Ryan Atkins extended the advantage but a Chris Tuson drive and Pat Richards' 90-metre run levelled it up at 16-16.
But Ben Westwood crossed to put Warrington in front again and Lee Briers' drop-goal made the game safe.
There was little hint of the drama to come as the Wolves hardly put a foot right in the opening quarter of the game.
In slippery conditions, a Richards penalty gave Wigan an early lead and, after the same man had a try ruled out for a knock-on, the Warriors extended their advantage when Mark Riddell scored straight from dummy-half.
Wigan dominated possession but were unable to add to their score and were stunned when first Hicks crossed in the corner and then Myler ran on to Briers' speculative kick to put Warrington ahead.
Shortly after the break Atkins gathered Chris Riley's kick to extend Warrington's advantage, but Wigan came roaring back through Tuson, who gathered Sam Tomkins' deft pass and charged over, and Richards, who scooped up a loose ball and ran almost the entire length of the field.
However Richards missed the conversion that would have put Wigan ahead, and the Warriors squandered another chance to take the lead when substitute Liam Farrell was unable to capitalise on a mistake by Richie Mathers.
Those missed opportunities were to prove crucial when Westwood charged onto Riley's pass for the all-important score before Briers added the finishing touch.
Wigan coach Michael Maguire:
"We put ourselves in great positions early on but didn't execute like we have in the past.
"You have to take your opportunities when you play a team like Warrington because you don't get too many chances and basically the game flipped on us.
"Warrington had a lot of errors in the first half and our completion rate was down to 42% in the second half. When you're competing that low, it makes it a very tough game of rugby league."
Warrington coach Tony Smith:
"Whether we won tonight was not going to make or break us but it's good to know we can lift when we need to.
"We needed to lift in our performance because we haven't been delivering what we can do and their form was terrific. We knew we needed a performance and we found one to a large degree."
Wigan: Roberts, Goulding, Gleeson, Carmont, Richards, S. Tomkins, Leuluai, Fielden, Riddell, Prescott, Hansen, J. Tomkins, S. O'Loughlin.
Replacements: Deacon, Mossop, Farrell, Tuson.
Warrington: Mathers, Hicks, King, Atkins, Riley, Briers, Myler, Morley, Monaghan, Carvell, L. Anderson, Westwood, Harrison.
Replacements: Clarke, Wood, Grix, Solomona.
Referee: Richard Silverwood (Dewsbury)