St Helens suffered their fifth defeat in six games as Wigan powered their way to victory at the JJB Stadium.
Wigan (21) 27:
Tries: Dallas, Lam, O'Loughlin, Radlinski
Goals: Farrell 5
St Helens (6) 18:
Tries: Hooper, Roby 2
Goals: Sculthorpe 3
The Warriors were dominant in the opening exchanges and tries from Brett Dallas, Adrian Lam and Sean O'Loughlin put them 18-0 ahead.
But Saints never gave up and reduced the deficit to just three points thanks to a try from Jason Hooper and two from James Roby after half-time.
However, full-back Kris Radlinski's late try sealed the win for Wigan.
Wigan caretaker coach Denis Betts said: "We were sensational in the first half. We did all the right things and played as we trained.
"But you've got to give credit to St Helens, who never lie down. They have some good players and their young kids stepped forward in the second half.
"We had four opportunities to kill the game off but we couldn't convert. It made for an exciting game to watch."
Saints coach Ian Millward said: "The kids were absolutely outstanding, I'm really proud of them. It was a very brave performance.
"We gave away a lot of penalties in the first half and our completion rate was poor, which has been a problem for the last six games.
"After half-time, we really lifted and at 21-18 we should have scored in the right-hand corner. I'm really proud of the way we got back in the game.
"There were a lot of positives out of it. The big thing for me is the improvement in our last two games. I'd still like to finish third, that's still our aim. I'm not happy with fifth."
Wigan: Radlinski, Dallas, Aspinwall, Wild, Carney, O'Loughlin,
Lam, Farrell, Newton, C. Smith, Cassidy, Tickle, Hock.
Replacements: O'Connor, M. Smith, Beswick, Connolly.
St Helens: Wellens, Albert, Gilmour, Talau, Gardner, Hooper,
Moore, Fozzard, Cunningham, Mason, Joynt, Wilkin, Sculthorpe.
Replacements: J. Roby, Bibey, Bennett, Stankevitch.
Referee: Ian Smith (Oldham)