|Warrington (14) 14|
|Tries: Ratchford, Gidley, Currie Goals: Gidley|
|Castleford (12) 34|
|Tries: Dorn 2, Millington, Solomona 2, McMeeken Goals: Gale 5|
Castleford scored 34 unanswered points to condemn leaders Warrington to their second straight Super League defeat.
The Wire led 14-0 after 30 minutes courtesy of tries from Stefan Ratchford, Kurt Gidley and Ben Currie.
Luke Dorn and Grant Millington reduced the deficit to two points at half-time before Denny Solomona put Cas ahead minutes after the restart.
Further scores Mike McMeeken, Solomona and Dorn stunned the St James' Park Magic Weekend crowd.
|Read Saturday's other Magic Weekend reports|
|Salford 18-12 Widnes|
|Leeds 8-40 Wigan|
Warrington went into their first encounter with Castleford at a Magic Weekend looking to bounce back from last week's 36-28 defeat by Wakefield, and they were in complete control for the first 30 minutes.
But Castleford refused to lie down and when full-back Dorn, who will retire at the end of the season, finished off a sensational team try, the momentum in the game shifted.
Tigers, who came into the game off the back of a huge 52-12 victory over Leeds Rhinos, then posted 22 second-half points as Wolves' wobble continued.
They remain top of Super League on points difference but have lost five of their last eight matches, and both Catalans Dragons will have the chance to move top when they play Wakefield tomorrow.
Castleford head coach Daryl Powell: "We were a little bit slow out of the blocks, they were winning contact consistently. They were just too good for us.
"We got some confidence after that 10 minutes just before half-time and then our second half was superb.
"It's certainly up there (as his best win as Castleford coach), to be able to flip a game like we did there. A, it gives you confidence and B, it gives you a knowledge that whatever is happening to you, you can turn a game around, which is obviously crucial for any team.
"We've hit a decent bit of form on the back of getting some players back. There's a confidence about us now and it's just about being consistent.
"It's round 15 today and we've got a bit of a way to go, but we'll give ourselves a chance if we keep turning up with performances like that, particularly the second half."
Warrington head coach Tony Smith: "I thought we were in pretty good control but we should have had more points on the board.
"I was hoping we wouldn't rue that later in the game, and we did. Cas threw a bit of caution to the wind on a couple of plays in that last seven or eight minutes of that first half and it worked for them.
"It gave them a little bit of confidence to have a crack in that second half and it probably took a bit of the wind out of our sails."
Warrington: Russell, Ormsby, T King, Jullien, Lineham, Gidley, Ratchford, Hill, Clark, Sims, Currie, Westwood, Westerman.
Replacements: Cox, Bailey, G King, Smith.
Castleford: Dorn, Flynn, Crooks, Monaghan, Solomona, Roberts, Gale, Tickle, Milner, Millington, Moors, McMeeken, Massey.
Replacements: McShane, Springer, Webster, Cook.
Referee: Gareth Hewer (RFL)