Seventh-placed Vikings went into the break 8-0 ahead thanks to two tries from Corey Thompson.
Liam Farrell's converted score brought Warriors back to within two against a side who defended stoutly despite at one stage having two in the sin-bin.
Wigan turned down a late chance for goal, but the visitors held out.
Shaun Wane's side need only one point to confirm a top-four finish, but decided against trying to draw the match when they won a 79th-minute penalty.
They decided to run it and, after it came to nothing, Widnes saw the clock down.
Wigan: S Tomkins, Charnley, Gelling, Sarginson, Tierney, Williams, Shorrocks, Sutton, Powell, Flower, Farrell, Bateman, Isa.
Replacements: Tautai, Gildart, Nuuausala, Bretherton.
Widnes: Hanbury, Thompson, Dean, Runciman, Marsh, Mellor, Brown, Burke, White, Buchanan, Whitley, Houston, Cahill.
Replacements: J Chapelhow, Dudson, Heremaia, Farrell.
Referee: Phil Bentham (RFL)

Researchers say the 1,000-year-old object with a swastika on its stomach is made from a rare form of iron with a high content of nickel.
They believe it is part of the Chinga meteorite, which crashed about 15,000 years ago.
The findings appear in the Journal, Meteoritics and Planetary Science.
The 24cm (9-inch) tall statue is 10kg (22lb) and is called the Iron Man.
The story of this priceless object owes more perhaps to an Indiana Jones film script than sober scientific research.
It was discovered in Tibet in 1938 by German scientist Ernst Schafer. His expedition was supported by the Nazis, in particular by Heinrich Himmler, the head of the SS. Himmler was said to believe the Aryan race originated in Tibet and was keen to recover objects from the area.
Brought back to Germany, the statue became part of a private collection and disappeared from view until 2007. A new owner then sought scientific advice on the origins. He turned to Dr Elmar Buchner from the University of Stuttgart.
"I was absolutely sure it was a meteorite when I saw it first, even at 10 metres" said Dr Buchner.
He said that the clue was in small, thumb like impressions caused by the melting of the surface. Further analysis showed that it was a rare ataxite class, a type of meteorite not often found on Earth.
"It is rich in nickel, it is rich in cobalt. Less than 0.1% of all meteorites and less than 1% of iron meteorites are ataxites, so it is the rarest type of meteorites you can find."
Meteorites have been seen as a sign of divine activity across many cultures since the dawn of time. Knives and jewellery were made from iron meteorites by ancient Inuit. But tracing their exact origins is often extremely difficult.
The German and Austrian scientists who worked on the Iron Man with Dr Buchner were surprised to be able to trace the statue to a specific event in meteorite history.
The researchers believe it was carved from a piece of the Chinga meteorite that fell in the border region of eastern Siberia and Mongolia about 15,000 years ago.
The debris from the crash was only discovered in 1913 by gold prospectors, but the individual fragment from which the statue was carved was collected many centuries before.
"We were quite astonished by the results," said Dr Buchner.
"OK, it's a meteorite but what amazed me was that we could also say it was from Chinga, that we could find the provenance, that was really astonishing for me."
The statue is believed to portray the god Vaisravana. The researchers think it belongs to the pre-Buddhist Bon culture that existed in Asia about 1,000 years ago.
"If we are right that it was made in the Bon culture in the 11th Century, it is absolutely priceless and absolutely unique worldwide," observed Dr Buchner.
Neither the person who carved it or the Nazis had any idea it was made from such a rare substance, he said.
In keeping with the Hollywood element in the story, Dr Buchner said the statue had a certain aura.
"It is extremely impressive, it was formerly almost completely gilded - there is a great mystery represented by it."
Widnes Vikings produced a superb defensive display to beat Wigan and leave Warriors still waiting to confirm their Super League play-off place.
[NEXT_CONCEPT]
An ancient statue that was recovered by a Nazi expedition in the 1930s was originally carved from a highly valuable meteorite.