Juventus would eventually hold firm for their ninth consecutive league win, though, and Allegri feels it shows just how much his side have improved after a poor start to the campaign.
READ MORE | Buffon: This is the Juventus we want to see
"It was a good win, we had to dig deep. Earning nine straight wins isn't easy, so full credit to the boys," Allegri told reporters.
"Our performance against Sampdoria was nothing like the Juventus from the start of the season. When individuals are growing, it is only logical that the team grows as well.
"We could have decided the game before, but conceded a goal instead after fine move from Antonio Cassano. I have to compliment him because he put in an extraordinary performance."
Juventus have moved to second spot in the table following this weekend's results, trailing leaders Napoli by two points, and Allegri has urged his players to keep going as their challenge for the Scudetto gathers momentum.
"Napoli are enjoying a fine season. They have spirit and quality and will be fighting for the Scudetto right until the end of the season.
"We need to keep producing consistent results. With Napoli on 41 points halfway through, I think we need 82 points to win the title.
"It was not easy to get back in the race and we now have to keep this up."