Wigan snatched a dramatic victory despite having captain Sean O’Loughlin sent off for the first time in his 15-year career.
The game was on a knife-edge in the last 13 minutes as Lewis Tierney crossed to peg Wakefield’s lead to 18-16.
And in the final minute - the last roll of the dice - the winger pounced onto George Williams’ drilled grubber to put them 20-18 ahead.
Matty Smith stepped up to kick the conversion after the final hooter had sounded.
The thrilling finish ensured they stretched their winning run to eight-games, and saw them take the lead at the top of the Super League table following Hull FC’s loss to Leeds.
While it wasn’t their most emphatic performances, given the circumstances it was a gutsy, courageous effort and the mood afterwards was one of immense pride.
They had played an hour of the game with just 12-men - with O’Loughlin’s red-card the major talking point.
The England captain was punished for a mistimed high tackle on Chris Annakin in the 38th minute.
Referee James Child, who had already shown two yellow cards, left fans and players frustrated throughout the match, but there was no argument with his decision to give O’Loughlin his marching orders.
It appeared his absence would hurt the home side, as Wakefield roared into an 18-10 lead - but Wigan’s never-say-die attitude came to the fore.
In the build-up, Wane had resisted talk of ‘revenge’ following their 62-0 mauling in their last meeting, pointing to a raft of injuries and illnesses for contributing to his heaviest ever loss.
They were hardly better-equipped last night in personnel, with nine frontline players missing through injury or suspension, including late withdrawal Dan Sarginson.
That forced a reshuffle of the backline which saw Josh Charnley move to centre and Tierney come onto the wing, while youngsters Kyle Shelford and Macauley Davies made their first appearances from the bench.
They took the number of academy-graduates making debuts for Wigan this year to eight - at this stage last season there had been none.
The squad had a strong local flavour with 13 academy-products included, while Wakefield including recent NRL recruit David Fifita.
Their resurgence under Chris Chester had stuttered of late, but they gave an early warning of their intent when they took a lead in the fifth minute.
Max Jowitt took an inside ball and punished a napping defence, and with Liam Finn converting it put them 6-0 ahead.
The wounded Warriors went searching for a leveller yet despite strong metres down the middle, their passing - both in terms of selection and execution - was off the mark.
They finally clicked into gear when a wonderful pass by Oliver Gildart released Tierney and, though he was dragged down by Jowitt, it set up a position inside Wakefield’s 20m which they failed to capitalise on.
Their cause wasn’t helped when Dom Manfredi was sinbinned for striking as he got to his feet to play the ball in the 19th minute.
But they finally got off the mark in the 25th minute. Williams, coming more into the game, slipped beyond Finn, arced for the corner and unselfishly turned the ball inside for Gildart to cross. Smith surprisingly missed the simple conversion attempt.
No sooner had Manfredi returned from the sinbin, Josh Charnley was shown a yellow card for a professional foul. But again they conjured a try while a man-down, and Williams was again the architect, stepping through a disjointed line to send Sam Powell crashing over in the 34th minute. Smith’s conversion put them 10-6 up.
But then came the major flashpoint, as O’Loughlin was shown the red card for whacking Annakin high, leaving the Wakefield forward sprawled on the floor. The challenge appeared mistimed, rather than malicious, but it was hard to argue with the decision.
The fears at half-time were whether Wigan would be able to hang onto their lead while down a man, and when Reece Lyne barged over in the 43rd minute, it seemed not. Finn’s conversion nudged them 12-10 ahead.
Davies and Shelford came off the bench to make their debuts. Shelford only played seven minutes but during that time he pulled off a try-saving tackle on Tinirau Arona. Davies didn’t last much longer, possibly owing to two handling errors.
The visitors were still able to extend their lead when Ben Jones-Bishop swept past a stretched defence in the corner. Finn missed the conversion but booted a penalty moments later to stretch their lead to eight points.
Wigan seemed sapped of energy, but when two penalties went in their favour it allowed them to march down field and, sensing an opportunity, a crisp sweep to the left finished with Tierney sliding over. Smith nailed the sideline conversion to cut the gap to just two points, with 12 minutes remaining.
Referee Child continued to frustrate the Wigan players with his interruptions, but the narrow margin kept the tension at breaking point.
With six minutes to go, Charnley left the action clutching his left arm, as the home side dialled up the temp with surging charges from Ben Flower and Taulima Tautai.
But their short-kicking game was well defended by a Wakefield side seeking their first win at the DW Stadium since 2009 - until Tierney’s last-gasp heroics.
Wigan: Tomkins; Tierney, Charnley, Gildart, Manfredi; Williams, Smith; Bretherton, Powell, Flower, Isa, Sutton, O’Loughlin. Subs: Tautai, Shorrocks, Shelford, Davies.
Wakefield: Jowitt; Hall, Lyne, Tupou, Jones-Bishop; Miller, Finn; Fifita, Moore, Arona, Molloy, Ashurst, Sio.Subs: Annakin, Walker, Walton, Arundel.
Referee: James Child
Starman: George Williams