The Wire trailed 30-12 just after the interval but Chris Sandow's last-minute drop goal saw them continue their 100% winning start to the season.
The hosts led by 16 points at the break with Junior Sau twice, Josh Jones and Greg Johnson scoring, while Jack Hughes and Ben Currie crossed for Warrington.
Ryan Atkins grabbed two tries and Ashton Sims another to set up Sandow to win the game incredibly on the hooter.
With no time left, Sandow scrambled free from an attempted Salford tackler and kicked a fantastic drop goal from 40 metres in pouring rain.
The defeat will feel especially difficult for Salford given their near total dominance of the first hour before Atkins crossed for his first try.
Tony Smith's Warrington finished sixth last season with a record of 15 wins and 15 defeats but have started the 2016 season in terrific form.
They travel to Perpignan to play Catalans Dragons in their next fixture, while Salford return to action with a trip to Castleford Tigers.
Salford head coach Ian Watson told BBC Radio Manchester:
"It's disappointing in the end - first-half we played really well, second-half we didn't do the same things.
"We need to learn that as a group, a club and a team that going forward to win these games we have to do the right things for 80 minutes.
"We'll learn from this but we'll make sure we learn quickly as well."
Warrington head coach Tony Smith told BBC Radio Merseyside:
"I've got to say I'm very, very proud of my boys to dig their way out of an uncomfortable hole.
"It was a remarkable field goal from Chris and it took the game away.
"It wasn't a plan to do it that way but we just felt that we could come home strong as long as we could stop leaking soft tries.
"I've got to say Salford were tremendous and played the conditions first class in that first-half."
Salford: O'Brien; Carney, Sau, J. Griffin, Johnson; Lui, Dobson; Kopczak, Lee, G. Griffin, Murdoch, Jones, Flanagan.
Replacements: Evalds, A. Walne, Tomkins, J. Walne.
Warrington: Russell; Penny, R. Evans, Atkins, Lineham; Ratchford, Sandow; Hill, Dwyer, Sims, Currie, Hughes, Westerman.
Replacements: Dodds, G. King, Jullien, Wheeler.
Warrington produced a stunning comeback to beat Salford and lead Super League.