The Tigers were second best for the opening quarter of the game, but recovered to mount a superbly skilful fightback.
The video referee confirmed the score, despite replays showing a possible trip on an opponent by Gene Ormsby.
Kurt Gidley went over in the eighth minute to put the Wolves further ahead, after a run of consecutive penalties.
Wire were really sparking into life by the tenth minute, with Ratchford looking ominously confident, as far as a stunned looking Cas were concerned.
Scotland full back Matty Russell put Ben Currie over for a simple try after a fine break. Russell caught a Cas kick just behind his own 10 metre line, and broke 70 metres before slipping a pass to Currie.
With 32 minutes gone, Wire led 14-0, but the Tigers struck back before half time, with Luke Dorn finishing off a superb team try, with a move sweeping left and right and back again in the Warrington 20m zone.
Gale’s successful conversion went in off the upright, perhaps a sign that momentum was shifting back into the Yorkshire side’s favour.
Things improved even further for Cas just before the interval, when Grant Millington showed great handling skills to outfox the Wire defence. Gale added the extras, and it was 14-12 to Warrington at half time.
The try was given, but the video referee arguably erred in not awarding Cas an eight point try, as it appeared as though Gidley was guilty of foul play on Solomona as the Tigers man was scoring.
Momentum had now swung entirely in favour of the Yorkshire side, with just over half an hour remaining.
Cas went further ahead when Mike McMeeken worked some magic with his right hand and the ball, and fooled the Wire defence to score a fine try.
The Tigers led 20-14 with 28 minutes remaning.
Solomona increased Castleford’s lead with his second try of the day and his 18th of the season in the 57th minute.
Gale knocked over a penalty to extend the lead by two points in the 63rd minute.
By the time the last 15 minutes rolled round, Cas were rampant, with Dorn crossing for his second try in the 67th minute.
The game petered out after that and ended Castleford 34-14 Warrington.