Napoli bounced back from conceding an early goal and missing a penalty to beat slumping Juventus 3-1 at the San Paolo stadium on Thursday and boost their hopes of Champions League qualification.
They also condemned Juve to an 11th Serie A defeat of the season and hit the Turin giants' own hopes of a top four finish.
Napoli dominated the game, particularly after the break and could easily have won by more goals.
Quagliarella believes they can close that gap.
"Today we played a great match, we showed that we have what it takes and we really deserved the win," he said.
"We still believe we can finish fourth, there's another eight matches left. Today was a vital test against one of our direct rivals.
"We'll take each step as it comes and Sunday we have another match even more difficult (against Catania)."
Zaccheroni bemoaned his team's lengthy injury list and said his players need to learn to overcome setbacks.
They have won only three of nine league matches since he took over at the end of January.
"I need to find a way to halt the haemorrhage of player absences. When you lose four, five or six players each week things become difficult," he said.
"There's two issues, one is to get our injured players back and to get them fit and playing, the other is to keep our heads up because you have to accept defeats."
Juve were off to a dream start, taking the lead after only seven minutes.
The hosts took their time to strike back and when they did it was from distance as Quagliarella forced Alex Manninger into a sprawling save from 25 yards.
Napoli poured forward and Lavezzi robbed Fabio Cannavaro on 20 minutes before cutting in from the left and shooting from 20 yards, with Manninger tipping the ball over the bar.
Juve then had a let-off when Del Piero was shown only a yellow card for slamming his forearm into the back of Gianluca Grava's neck.
The hosts had a golden chance to equalise from the spot in the second minute after the break when Zebina was penalised for another shirt tug on Quagliarella, but Hamsik clipped the top of the bar with his lashed effort.
But only three minutes later, Napoli had the equaliser they deserved as Quagliarella robbed Camoranesi, turned Zebina and crossed to the back post where Hamsik rose high to head home from close range.
Juventus simply could not handle crosses and Hamsik turned provider next, sending an in-swinger from the left that Quagliarella slid in to poke home at the back post with Manninger beaten by the cross 18 minutes from time.
Lavezzi finished off Juve on the counter-attack two minutes from the end as he collected Hugo Campagnaro's pass unmarked in the box and shot home low past Manninger.
Source: AFP Global Edition