The Bianconeri were the better of the two sides over the opening 45 minutes with Gonzalo Higuain and Juan Cuadrado both culpable for squandering good chances.
But, after attempting only one shot in the first half, Sampdoria exploded to life after the restart as they raced to a three-goal lead by the 79th minute.
Juve reduced the deficit to one with stoppage time strikes from Higuain and Paulo Dybala, but Allegri was made to pay for leaving the likes of Dybala, Gianluigi Buffon and Andrea Barzagli out of his starting XI.
"We needed patience after going 1-0 down and not to lose our sharpness, as there were 40 minutes to go. Plenty of time to turn it around," Allegri told Mediaset Premium.
"From a possible equaliser, we went 2-0 behind. That can happen too, but we cannot leave ourselves open to the counter. It is disappointing.
"This was an unexpected slap that really made us lose our cool. We should have been patient, even if things were not going our way. It is a long game, you have to stay calm."
3 - Sampdoria have scored three times with the first four shots on target they have fired in this match. Fierce. #sampdoriajuventus— OptaPaolo (@OptaPaolo) November 19, 2017
Allegri also pointed the finger at Sami Khedira for his role in the decisive third, scored by Gianmarco Ferrari.
"If Khedira had not stood there with his hand up appealing for offside, we would not have conceded the third goal," he said.
"It was a bit like [in the 2-2 draw with] Atalanta, as when we slow down the tempo, we run huge risks. We've got to patch things up."