Wigan maintained their new momentum with a third win in a row, significantly against one of the sides that could save them from relegation.
The Warriors survived two exotic calls from the video referee and a late resurgence from Quins, who are now just three points ahead in the lower reaches of Super League.
"I just don't know where they came from,'' said the Wigan coach, Brian Noble, of the decisions that gave Harlequins two tries. "They didn't affect the result in the end, but they made it more anxious than it should have been.''
All the anxiety of relegation-threatened sides was visible in the first 18 minutes of slog in the stifling conditions, before the deadlock was broken in the most contentious manner. Henry Paul timed his pass well to Solomon Haumono, but the second-rower seemed to be held up over the line before being the beneficiary of a new ruling that allows the attacker the benefit of the doubt.
Paul kicked the conversion and then thought he had sent Tyrone Smith away with another defence-splitting pass. This time the decision went to Wigan, with Karl Kirkpatrick ruling a forward pass.
From that handover of possession Wigan produced an incisive attack, Danny Orr and Bryan Fletcher sending Chris Ashton over. Paul then undid his good work by throwing a pass which was intercepted by Brett Dallas, who ran 50 metres to score.
Fans who had been watching football in the bars came out into the sunlight to find Wigan 12-6 ahead, but that lead disappeared when Pat Weisner was credited with a penalty try as two tacklers prevented him from getting the ball over the line - another very debatable ruling from Gerry Kershaw in the video booth.
Michael Dobson edged Wigan in front with a penalty at the start of the second half but there was no dispute about the try that put Quins back in the lead, Thomas Leuluai and Karl Temata sending in Joe Mbu.
A lovely break and kick from Orr then set up Mark Calderwood for the converted try that swung the game Wigan's way again.
"We saw signs of the real Danny Orr tonight," said Noble. "He's enjoying his game and enjoying playing with this pack.''
The result seemed to have been confirmed when Orr sent Calderwood down the right. When he was caught by McLinden he got the ball infield for Ashton's second.
There was a nerve-wracking last few minutes after Zeb Luisi got the ball out of the tackle for Mark McLinden to score, but Wigan deserved the win and look a much better bet than they did a month ago to avoid relegation.
Harlequins: Luisi; Wells, Smith, Gafa, Bradley-Qalilawa; Paul, McLinden; Temata, Randall, Tookey, Haumono, Purdham, Mbu. Substitutes used: Leuluai, Heckenberg, Williams, Weisner.
Wigan: Ashton; Calderwood, McAvoy, Radlinski, Dallas; Orr, Dobson; Fielden, Higham, Paleaaesina, Hock, Fletcher, O'Loughlin. Substitutes used: O'Carroll, Logan, Tickle, Hansen.
Referee: K Kirkpatrick (Warrington).Reuse content