Samp, who spent much of the season hovering in and around the relegation zone, climbed to 12th with 41 points after their fifth win in six games, one place and one point above their opponents who are going in the other direction.
The two sides produced a thrilling match despite playing in the unpopular late afternoon kickoff slot with a temperature of 31 Celsius.
Premier League
Watford set to sack Ranieri after Norwich defeat - reports
Ivorian forward Gervinho fired Parma ahead after 18 minutes with a trademark solo goal and Samp defender Bartosz Bereszynski turned Dejan Kulusevski's cross into his own net to double their lead five minutes before halftime.
Gianluca Caprari also had a goal ruled out for Parma in between after VAR spotted that he was offside and Gervinho struck the post on the stroke of halftime.
Julian Chabot began the fightback by heading in from a corner three minutes after the break and Quagliarella curled in the equaliser in the 69th minute, shortly after Gaston Brugman hit the bar for Parma.
The 37-year-old Quagliarella then exchanged passes with halftime substitute Federico Bonazzoli who scored the winner nine minutes later.

Barcelona players want Patrick Kluivert as their new boss - Euro Papers

Africa Cup of Nations
Nigeria accuse Watford of ‘baring fangs’ with Dennis out of AFCON squad
31/12/2021 AT 14:09
Premier League
'We were not ready' - Tuchel questions 'unusual' performance as Chelsea survive scare
02/12/2021 AT 09:39