Zak Hardaker's sizzling 40m drop-goal secured Wigan a gutsy win which kept alive their top-three hopes.
In a thrilling finish to a scrappy game, full-back Hardaker ensured the game would not head into golden-point - like their meeting earlier this year - by striking a decisive one-pointer with four minutes to go.
The victory closed the gap on third-placed Hull FC to just two points, with five games to go - and for the Warriors, four are at home.
Earlier, Liam Marshall had scored both Wigan's tries as they took a 14-6 lead, only for FC to claw their way back into the match and level the scores.
The match was littered with errors but also illuminated by some wonderful solo efforts, including towering efforts from forwards Willie Isa, Morgan Smithies, Ollie Partington and Tony Clubb.
The only disappointment was a chest injury to captain Sean O'Loughlin which Adrian Lam will hope is not serious.
He was one of three players who returned to the side which beat Wakefield 46-16 in their last outing, along with Thomas Leuluai and Joe Burgess.
With four points splitting the sides before kick-off, both sides were aware of the significance in the race for third spot.
The stakes and the occasional needle kept the action engrossing, but the opening half was a low-quality affair punctuated by the trill of Ben Thaler's whistle.
There were 16 points scored but only one try, as marksmen Marc Sneyd and Zak Hardaker took centre stage in an opening stanza which the visitors edged 10-6.
Sneyd's boot had put the hosts 4-0 up through two penalties as Wigan took time to settle into their rhythm.
Ollie Partington's bone-shuddering shot on Joe Westerman forced an error and set the tone for a spicy second quarter.
O'Loughlin's introduction from the bench calmed the side, and a raking move to the right saw Leuluai chip over for Marshall to leap, collect and twist over to ground the ball.
He was even awarded a rare 'eight point try' - a penalty awarded after Hardaker's conversion - for being tackled in the air by Bureta Faraimo.
That swung the game 8-4 in Wigan's favour and a subsequent penalty opened up a six point gap by the half-hour mark.
Errors blotted both attacks before Sneyd struck a penalty on the stroke of half-time after being taken out late by Willie Isa - and the pair continued their feud on their way to the changing rooms.
The early exchanges of the second-half were just as scrappy but a forced offload by FC gift-wrapped the visitors a chance to extend their lead - and Marshall rounded a stretched defence to make it 14-6.
It was a stylish effort yet he was upstaged by a defensive effort from prop Tony Clubb moments later, when he dashed across to cut down a breakaway Ratu Naulago with a remarkable cover tackle.
Liam Byrne was denied a try by the video referee before Wigan were pressed into a period of defending their line.
And when Burgess spilled a kick, it presented FC the position for ex-Warrior Scott Taylor to rumble over with 15 minutes to go. Sneyd's conversion reeled in Wigan's lead to 14-12 and then with 10 minutes to go, he locked the scores after Smithies was pinged for a high tackle of Mark Minichiello.
Isa's pressure thwarted a Sneyd drop-goal attempt before Hardaker settled an absorbing contest.
Hull FC: Shaul; Faraimo, Griffin, Tuimavave, Naulago; Kelly, Sneyd; Taylor, Houghton, Green, Minichiello, Lane, Westerman
Subs: Ellis, Fash, Connor, Matongo
Wigan Warriors: Hardaker; Marshall, Sarginson, Gildart, Burgess; Williams, Leuluai; Navarrete, Powell, Partington, Isa, Farrell, Smithies.
Subs: Clubb, O'Loughlin, Byrne, Sammut.
Referee: Ben Thaler