Harlequins RL 18
Tries: Randall, Gafa, McCarthy-Scarsbrook, Melling
Wigan Warriors: 24
Tries: Ainscough (2), Carmont, Bailey, Roberts
Goals: Richards (2)
Shaun Ainscough crossed for two tries as Wigan eased the pressure by coming from behind to defeat Harlequins at The Stoop.
It required two late tries to down a spirited Quins side, who will rue a number of near misses.
Wigan's poor start to the season was in evidence in a nervy opening 10 minutes which saw both Chris Melling and David Howell go close to crossing for the home side.
But slowly the Warriors gained a foothold in the game and they took the lead with their first serious assault, George Carmont delaying his pass to send Ainscough scampering over in the corner.
Pat Richards converted, but Quins then rocked Wigan with two quick-fire tries that turned the game on its head.
Firstly, Howell's pass was fumbled by a number of players from both sides, allowing Chad Randall to pounce and drop over the line.
And, moments later, a searing Jon Wells break saw the ball spun wide for Matt Gafa to touch down and give the Londoners the lead.
Quins had further chances to increase their lead, but a combination of desperate defence and a loose final pass kept the scores close.
And the hosts were made to pay for their profligacy when within five minutes of the restart both Carmont and Phil Bailey had crossed in a whirlwind Wigan response, the first set up by a brilliant Sam Tomkins break and world class offload by Shaun Ainscough.
The visitors were now in the ascendancy, and only scrambling Quins defence kept them in the game.
And that proved crucial as 15 minutes from time Louie McCarthy-Scarsbrook bullied his way over from close range to tie the game, and then former Wigan man Melling dived over in the corner to give Quins the lead.
But Wigan were not to be denied, and after Amos Roberts scorched in for an interception try to regain the lead, Ainscough touched down in the dying seconds to secure victory.
Harlequins RL: Jon Wells, Chris Melling, Matthew Gafa, David Howell, Will Sharp, Luke Dorn, Danny Orr, Karl Temata, Chad Randall, Danny Ward, Chad Robinson, Tony Clubb, Robert Purdham
Subs: Louis McCarthy-Scarsbrook, Jason Golden, Daniel Heckenberg, Luke Gale
Wigan Warriors: Pat Richards, Amos Roberts, Phil Bailey, George Carmont, Shaun Ainscough, Tim Smith, Thomas Leuluai, Stuart Fielden, Mark Riddell, Andy Coley, Gareth Hock, Joel Tomkins, Sean O'Loughlin
Subs: Iafeta Paleaaesina, Harrison Hansen, Eamon O'Carroll, Sam Tomkins
Referee: Mr T Alibert