It was a 13th successive defeat for Wakefield, who announced Australian Brian Smith as their new coach before the game.
Cas made an explosive start, racing into a 16-0 lead after just 10 minutes, but Wakefield hit back strongly to go in at the break only six points behind.
Denny Solomona touched down twice, off passes from Michael Shenton and Luke Gale, before Shenton burst up the middle, dummied past full-back Richard Owen and Jordan Tansey was in support to score.
Wakefield hit back on 15 minutes when young winger Tom Johnstone intercepted Oliver Holmes’ pass to score from inside his own half, then Daniel Smith crossed from Jon Molloy’s offload after Ashley Gibson failed to deal with Tim Smith’s high kick, Jacob Miller converting both.
Shenton powered over from Tansey’s pass and Solomona thought he had completed a hat-trick, but he put a foot on the touchline in Johnstone’s tackle.
Wakefield took advantage of that let off when Johnstone added his second try, from Dean Collis’ pass, to cut Castleford’s interval advantage to 22-16.
Wakefield pressed forward at the start of the second half, but Solomona completed his hat-trick after Owen slipped trying to reach Gale’s kick, then Gibson crossed twice in quick succession, after good work by Jake Webster.
Solomona added a fourth try on the hour when Johnstone and Owen collided under Gale’s bomb.
Gale capped an outstanding performance by finishing off a long-range move involving Solomona and Holmes, his seventh goal taking Tigers to the half-century mark.
Two minutes from time Gibson completed his hat-trick with a spectacular finish from Tansey’s pass and Gale landed his 10th goal.
It was only the second time both Castleford wingers have scored a hat-trick in the same game.
Both teams lost a player inside the opening two minutes, Castleford hooker Scott Moore - who was making his return from injury - and Wakefield prop Scott Anderson going off after a sickening collision.