The Reds triumphed three times over Wakefield in 2006, but found them a more stubborn outfit in their first meeting of this campaign.
Second-half tries by Kevin Henderson and Tevita Latu put Wildcats in control at 28-14.
But Gareth Haggerty started and finished an 80-metre interception try on 68 minutes, and Daley Williams touched down wide out to set up a tense final four minutes of an absorbing clash at 30-24 after Jamie Rooney had put over a seemingly match-saving penalty.
Rooney then popped up in the final seconds to touch down and make the game safe. His conversion also took his points tally for the afternoon to 20.
Two tries in five minutes from the half-hour mark by centre Ryan Atkins and second-rower Duncan MacGillivray gave Wakefield a commanding-looking 16-6 advantage.
But never-say-die Salford hit back in the second quarter and cut the half-time deficit to just two points following a Luke Adamson try and conversion by wing Jon Wilshere. who also landed a penalty right on the hooter.
Earlier, home half-back Rooney had kicked Wakefield ahead with a couple of penalties, wiped out by a Simon Finnigan try converted by Wilshere after 12 minutes and a solid period of penalty-assisted pressure play by the visitors.
Wakefield Trinity Wildcats (16) 36 Tries: Atkins, MacGillivray, Henderson, Latu, Rooney Goals: Rooney 8
Salford City Reds (14) 24 Tries: Finnigan, Adamson, Haggerty, Williams Goals: Wilshere 4
Wakefield Trinity Wildcats: Blaymire, Fox, Demetriou, Atkins, Tadulala, Rooney, Jeffries, Watene, P. March, Moore, Elima, MacGillivray, Ferres. Replacements: Henderson, Latu, Lima, Catic.
Salford City Reds: Hodgson, Williams, Littler, McGuinness, Wilshere, Dorn, Robinson, Coley, Alker, Korkidas, Edmondson, Adamson, Finnigan. Replacements: Haggerty, Jewitt, Halliwell, Brocklehurst.
Referee: I Smith