A crucial try from Sam Tomkins, and a pressure-cooker conversion from Matty Smith, allowed Warriors to get out of jail in a real rumble by the Humber.
Just over a minute remained when Tomkins stepped inside and reached over the line to level the scores, before Smith added the extras to send the visiting supporters home tired but very happy.
The night had begun very promisingly for Warriors, after Dom Manfredi crossed twice inside the opening 13 minutes to open-up an 8-0 advantage.
But Rovers gradually came back into it and, after Albert Kelly had scored a converted try on the half-hour mark, second-half scores by Thomas Minns and Mitch Allgood saw them lead by 10 inside the final quarter.
However, a breathtaking break from youngster Lewis Tierney set up the field position that saw Anthony Gelling score in the right-hand corner.
Smith’s cool conversion set up a grandstand finish, and the scrum-half held his nerve right at the death after Tomkins had danced his way over.
Warriors had been forced into a last-gasp change to the side when, with the team sheets already handed out, Dan Sarginson pulled up lame in the warm-up.
That meant an 11th-hour call for Tierney on the left wing, with Josh Charnley moving in to the centres.
Most of the action in the early stages came down the opposite wing, with Rovers almost in front inside three minutes.
The home fans on the far side thought Kieran Dixon had got the ball down inches inside the corner flag, but the officials ruled otherwise.
Salt was rubbed into those wounds in the blink of an eye, as Warriors went right up the other end and scored in virtually carbon-copy fashion.
This time it was Manfredi claiming the score despite taking the corner flag with him, but crucially the officials saw nothing wrong to hand Warriors the advantage.
Warriors almost extended their lead when quick hands left allowed Tierney a sight of the line, although he was halted by brutally-effective defence from Kelly.
The respite was only temporary, however, as a cut-out ball from Tomkins sent Manfredi in again with only 13 gone.
Again Smith couldn’t get near with the difficult conversion, but he made partial amends with a superb bomb that caused Rovers full-back Matty Marsh to fumble right under his own sticks.
However, his colleagues got him out of jail with some outstanding cover defence, before a knock-on from Dom Crosby alleviated the pressure.
After dusting themselves down, Rovers threatened midway through the half when Dixon took a nice ball from Terry Campese only to lose the ball as he attempted to touch it down.
But Rovers weren’t to be denied and they were on the scoreboard just before the half-hour mark when Tierney couldn’t take a difficult kick and Kelly forced the ball down in the corner.
Ken Sio booted over a fantastic conversion to reduce the arrears to two points, but Wigan were right back at it in the next set.
Wigan moved the ball down the right giving Gelling the space he was after, and they were given a repeat set when Dixon was unable to gather a clever kick.
Great defence held the visitors out, though, and it was a narrow two-point advantage at the break.
The home side came out by far the stronger in the second half, and were ahead within 10 minutes of the restart.
Minns and Sio exchanged passes down the right for the former to score by the posts, with the latter’s simple conversion making it 12-8 to Rovers.
Wigan’s attempt at a comeback was foiled when Charnley attempted to cut inside when he had Tierney on his outside, only to be dragged down by the cover.
There was more profligacy on the hour mark when Joel Tomkins took control nicely from a play-the-ball 10 yards out, only to throw the final pass way over the head of Tierney with the tryline begging.
Those misses came back to haunt Wigan when Rovers went further ahead on 63 minutes, when a beautifully-timed pass from Kelly sent Allgood walking over under the sticks.
Sio couldn’t miss the goal to extend the lead to 10 points with time running out.
But again Wigan showed great heart to deliver another twist five minutes later.
A wonderful break from Tierney saw the youngster race fully 60 yards, and he would have gone all the way had he not been hauled down by former Warrior Iain Thornley.
However, a quick play-the-ball saw Gelling skip over in the right-hand corner, with Smith’s goal reducing the arrears to just four points.
And Rovers hearts were broken in a dramatic finale, when the defence couldn’t get hold of Tomkins, allowing Smith to send a tough conversion right through the posts.