Wildcats began the Easter period bottom of the table, but wins over Huddersfield Giants, Leeds Rhinos and Salford have lifted them to eighth in the table, at least until Castleford play on Sunday.
Wildcats led 16-12 at the break, after having had an early 12-0 lead wiped out and withstood a fierce barrage in the second half before sealing a fine win with two late tries.
The hosts set off at a fast pace and scored two converted tries in the opening seven minutes.
Jacob Miller stepped over after three minutes from Liam Finn’s pass and then Finn sent Danny Kirmond into space and Mikey Sio was in support to crash over.
Finn converted both, but Salford struck back on 16 when Gareth O’Brien crossed for a try which he also improved.
Then six minutes before the break Michael Dobson’s pass put O’Brien clear and Matt Sarsfield backed up to score.
O’Brien’s conversion levelled the scores, but Johnstone edged Wakefield ahead just before the interval with a brilliant take from Miller’s accurate cross-kick on the final tackle.
Johnstone scored again eight minutes into the second half, with a fantastic finish from a wonderful pass by another impressive Wakefield youngster, full-back Max Jowitt.
Finn’s goal made it 22-12, but Salford attacked relentlessly after that. Only a brilliant chase back by Nick Scruton kept Dobson out, then Niall Evalds was held up over the line by Ben Jones-Bishop, Finn and Kirmond.
Wildcats eventually cracked when Justin Carney forced his way over and Dobson converted to cut the gap to four points with 18 minutes left.
Ben Jones-Bishop’s last-ditch tackle kept Junior Sa’u out with six minutes remaing and in the next set Wildcats burst up field and Reece Lyne dummied over for the clinching try, improved by Finn.
There was still time for Johnstone to score his third from Jowitt’s pass in the final moments.