Warrington 28 Wigan 35
Anthony Gelling added the crowning glory as 12-man Wigan produced a stunning fightback to keep on track for a top-two finish.
Ben Flower was dramatic sent off in the 57th minute when Warrington held a controlling 28-14 lead.
But Wigan conjured a remarkable effort in a breathless final quarter.
Two tries by Josh Charnley cut the margin to four points before Lewis Tierney locked the scored with eight minutes to go.
Matty Smith poked the visitors ahead with a drop-goal, before Gelling sealed victory with an intercept with less than two minutes left on the clock.
He tumbled over the line in delight before celebrating in front of the joyous visiting fans.
The ramifications of the result was significant.
It denied Warrington the chance to wrap up the league leaders’ shield, which will now be decided when they face Hull FC next week.
And it ensured Wigan will finish second - and claim a home semi-final - if they beat Catalans next Friday.
This was a performance the Warriors needed and, from a neutral point of view, Super League needed; an end-to-end game packed with drama, skill and - yes - controversy, to inject some life into the stagnant Super 8s series.
Flower’s red card was the obvious flashpoint. He was punished for a high, and late, challenge after Declan Hatton’s clearing kick - his first dismissal since the 2014 Grand Final.
But the way Wigan responded was hugely-impressive, and richly encouraging, both for the skill to score four tries while down a man, and for the spirit which was fingerprinted on their display.
And the fact they scored so many points against the pace-setters, and at the HJ, will please those who have questioned their attacking potency.
In a spirited team display, George Williams, Gelling and Tierney regularly impressed, while Sam Tomkins enjoyed arguably - no, easily - his best game since returning to the club.
The Wolves - the only side who the Warriors had yet to beat this year - knew a win would secure them the league leaders’ shield.
They were still missing Chris Sandow, though they had won their previous two games without their mercurial halfback.
Wigan were unchanged from the 16-12 win at Hull FC - the first time this year Shaun Wane had named the same squad for successive weeks.
And they had no shortage of motivation themselves, as they chased a hat-trick of wins against their top-four rivals within a month.
These fixtures rarely disappoint and by half-time, the game was on a knife edge after an opening 40 minutes packed with action.
Wigan started the brighter, and had powered ahead with less than two minutes on the clock.
Williams - still sporting a blond rinse as punishment for being late to training - provided a touch of class with a cutout pass for Lewis Tierney to cross.
Matty Smith slipped, and missed, as he went for the conversion, but struck a ninth minute penalty to make it 6-0 without Wolves completing a single set in possession.
Wigan’s cause wasn’t helped by the loss of Sam Powell to injury, and the home side finally found a familiar rhythm, as their rapid dummy-half darts frequently eased them upfield.
A freeflowing move triggered by Anthony Gelling’s rampaging run provided some respite - Evens rescued Warrington, and prevented a ‘try of the season’ contender - but it set the position for Smith to nudge them eight points ahead with a penalty.
So far, so good.
But Wigan, who had conceded just four tries in their previous three games, leaked three tries in less than 20 minutes to fall 16-14 behind at the break. The first of those was scored by ex-Warrior Matty Russell, who latched onto Declan Patton’s looping pass.
The drama was unfolding thick and fast.
Williams’ pass released Tierney, who did well first to blaze up field, and secondly to stay in the pitch under Jack Hughes’ covering tackle. But Stefan Ratchford flopped on top, and Robert Hicks - perhaps harshly - sinbinned the ex-St Pat’s amateur.
Warrington, though, managed to cross twice while down to 12 men, first by picking apart the defence to allow Gidley to cross and then when Chris Hill angled through a flaky defence.
Sandwiched between those scores, Willie Isa reluctantly left the pitch and appeared to give the fingers to the home fans - an incident which may be reviewed by the Rugby Football League.
With Patton converting Wolves’ last two tries, Wigan found themselves 16-8 down, but they recovered well and in the final minute of the half, Sam Tomkins’ brave dash to the line produced a try which, once converted by Smith, cut the margin to just two points.
Early in the second-half, Warriors repeatedly found themselves facing the wrath of Hicks.
Right, wrong or harsh, the penalties proved their undoing as first Joe Westerman trundled over, and then Currie charged through on the 50th minute, injuring himself in the process.
With Patton converting both tries, it left Wigan 28-14 down with half an hour to play. Starting props Frank-Paul Nuuausala and Flower returned from the bench, and they thought they had pulled a try back through Tierney - only for Hicks to rule Liam Farrell’s pass forward.
After the major flashpoint surrounding Flower, Wigan managed to close the gap on the hour when Williams pierced the line, fed Gelling and - from that position - Charnley had the power and poise to ground in the corner.
Smith couldn’t convert, but a 10-point margin was far from out of their reach. Charnley repeated the trick before Tierney’s second try, which was eventually given after repeated views by the video official.
Jake Shorrocks converted Charnley’s second try, but couldn’t add to Tierney’s try, keeping the score 28-28.
But Smith’s drop-goal poked them ahead and, as Warrington kept the ball alive in search of a match-winning try, Gelling intercepted a wayward pass to sprint clear.
Warrington: Ratchford; Russell, King, Atkins, Evans; Gidley, Patton; Hill, Clark, Sims, Currie, Hughes, Westerman. Subs: Wilde, King, Philbin, Dwyer.
Wigan: S Tomkins; Charnley, Gelling, Sarginson, Tierney; Williams, Smith; Nuuausala, Powell, Flower, Bateman, Farrell, Isa. Subs: Crosby, Tautai, Sutton, Shorrocks.
Referee: Robert Hicks
Starman: Sam Tomkins