The home side went into the lead after just four minutes when winger Dom Manfredi found a gap to burst through from close range before touching down.
Wigan then increased their lead two minutes later as Matt Bowen ran the ball over for a try after a 30-yard solo run.
The tables turned two minutes before the break when Junior Moors forced his way through the Wigan defensive live for the try, and Gale kicked the conversion to put Castleford 12-10 up at half time.
Wigan replied, though, and again went ahead through Manfredi's second try of the night by driving his way over the Tigers' line.
Castleford's Denny Solomona was shown a yellow card after 55 minutes, and Wigan took full advantage with Manfredi battering his way over the line for his hat-trick.
Manfredi scored his fourth try of the night two minutes later by finishing in the corner, but Bowen failed to convert as the Warriors went 24-12 up.
The hosts were not quite finished, either, and went 41-12 up when Joe Burgess darted over the line from close range.
Larne Patrick concluded the scoring in the final minute of the game by diving over the try-line, but while Wigan finished convincing winners, the scoreline was not enough to secure the League Leaders' Shield after Leeds Rhinos picked up a late win against Huddersfield Giants.