Louie McCarthy-Scarsbrook's superb 72nd-minute try gave them a 22-14 lead and should have put them in control.
But instead they let in Stephen Nash for a converted try - and then Chris Melling kicked out on the full from the restart.
Salford grabbed the lifeline, punishing Quins with a Luke Swain try to claim only their second win in 11 games.
Quins coach Brian McDermott said: "If we get to the play-offs, very good, but playing like that I do not think we will get there.
""Playing like that I do not want to be there. I am not interested in the play-offs - we have far more on our plate.
"There is no magic wand to be waved. I am concerned that we have not been playing well for some weeks."
Quins, who have lost eight of their last nine games, took a first-half lead with tries from Luke Dorn and Chad Randall.
They also took a grip of the second half after McCarthy-Scarsbrook sent in Rob Purdham and then scored himself. But the Reds, who had taken an early lead from John Wilshere, were repeatedly let back into the game. They took the lead with two late first-half tries from John Wells and Dean McGilvray - and then repeated the trick at the end of the second half.
The second-bottom side have only pride to play for but boss Shaun McRae said: "We can provide nuisance value for teams.
"Harlequins had a lot to play for today and their motivation might have exceeded ours, but we deserved to win."
SCORERS - Quins: tries Dorn, Randall, Purdham, McCarthy- Scarsbrook; goals Purdham 3. Salford: tries Wilshere 2, McGilvray, Nash, Swain; goals Wilshere 3.
This article has 0 comments