|Wigan (10) 20|
|Tries: Charnley, Burgess, Hampshire, Gelling Goals: Smith 2|
|Widnes (10) 10|
|Tries: Gilmore, Dean Goals: Gilmore|
Wigan Warriors kept up their pursuit of a top two finish with a narrow victory against a Widnes side who miss out on a Super League top eight place.
Ryan Hampshire and Anthony Gelling tries settled a close game, locked at 10-10 for much of the second half.
Josh Charnley had given Wigan an early lead, cancelled out by Widnes tries from Tom Gilmore and Chris Dean.
The Warriors are two points behind leaders Leeds, who also won, and a point behind St Helens in second.
Widnes, on 17 points, join Wakefield and Salford in the middle tier and could be joined by Hull KR if Catalans beat Huddersfield in Perpignan on Saturday.
Denis Betts' side had not won at Wigan since 2003 and that record looked likely to continue when Charnley was put in by Hampshire's offload early on.
However smart hands from Aaron Heremaia and Rhys Hanbury created space for Gilmore to cross, and he in turn put Dean across to the right of the sticks soon after.
Fine footwork from Gelling and then Joe Burgess saw the Sydney Roosters-bound winger touch down, with Matty Smith levelling with the boot to make it 10-10 at the break.
Last season's Super League runners-up found enough late on to see off Widnes down their left edge.
First Gelling and Burgess moved the ball out then in for Hampshire's try, and Gelling powered through off Liam Farrell's pass to settle the game.
Wigan head coach Shaun Wane:
"Widnes were outstanding, I thought they played really well. They have gone under the radar quite a bit and I was really impressed with how they played. It was a win. I thought we showed some toughness in the last quarter, but that is probably the best performance Widnes have put together.
"Credit to Widnes in how they defended, but we did enough to find the win and we wasn't doing that at the start of the year.
"We are finding ways of winning games when we are not really killing it in how we are playing. We had to work for this and just to get the win I am satisfied."
Widnes head coach Denis Betts:
"We were close to being the better team. We scored the best tries and made some good line breaks, they scored a couple of scrappy tries and they definitely did not score the first try of the game I know that much.
"The referee and the linesman not seeing something as blatant as a player standing five yards offside - it would have been a completely different game on the back of that poor error at the start.
"It is a tough job for the referee, but they are not getting any help from the linesmen. It is hard to take - you know there are mistakes in the game, but these are the calls you have got to see. The final score says 20-10, but it was a lot closer than that."
Wigan: Hampshire; Charnley, Gelling, Bateman, Burgess; Williams, Smith; Crosby, McIlorum, Tautai, Tomkins, L. Farrell, O'Loughlin.
Replacements: Flower, Clubb, Mossop, Patrick.
Widnes: Hanbury; Ah Van, Isa, Dean, Flynn; Mellor, Gilmore; Dudson, Heremaia, O'Carroll, Clarkson, Galea, Cahill.
Replacements: Manuokafoa, Craven, Gerrard, Leuluai.
Referee: Phil Bentham (RFL).