WATCH: Vlahovic stars as resurgent Juventus bounces back
Juve had not won in three Serie A games, including a 5-1 thrashing by Napoli and a surprise 2-0 defeat to Monza, while the club had also been docked 15 points following an investigation into past transfer dealings.
But Allegri's side bounced back on Wednesday with a dominant 3-0 victory at Salernitana as Dusan Vlahovic scored twice and assisted Serbia team-mate Filip Kostic for the other.
Victory moved Juve up to 10th, albeit some 13 points off fourth-placed Lazio, and Allegri heaped praise on his side's resilience amid a difficult time in Turin.
The Juve head said: "The lads are responsible, we can tell each other many things, but I think it wasn't and isn't easy to keep your head in the championship after 15 points were taken away from you.
"We set ourselves some goals, which is to catch those in front of us. Then there's the Coppa Italia [semi-final] with Inter and the Europa League.
"It was important to win. We have 26 points, no one remembers that we scored 41 and we would be third in the standings. Look at the current standings."
Vlahovic took his tally to eight for the season with his first-half penalty and cool finish after the interval, with Allegri delighted to see his star striker returning to form, along with some vital minutes for Angel Di Maria.
"If Di Maria always plays 60 minutes, I'm happy, he's a champion. Vlahovic is coming back well, meanwhile [Moise] Kean has had important chances," Allegri added.
"We need all these players, it's normal that we need to improve in possession. We play every three days, so everyone is important."