A Paulo Dybala strike gave the Old Lady the lead before former Juve defender and current Milan star Leonardo Bonucci levelled things up.
Late strikes from Juan Cuadrado and Sami Khedira ensured Juventus moved four points clear of Napoli, who drew with Sassuolo earlier on Saturday.
Speaking to Mediaset Premium as quoted by Football Italia, Allegri said: “I’m happy for Bonucci that he got a goal, but I’m even happier that Juventus won.
“It was important to get back to winning ways against Milan, who are in good shape. We scored, then ground to a halt. The lads did well to bring the result home in a difficult fixture and to increase our lead at the top of the table. Wins like this send a signal.
“Khedira is a world class player and he knows how to read the crucial moments of a match. That is very important, as in some moments you need certain players and at others you can change and introduce substitutes who can turn it around.
“We really could’ve done with a player like Khedira against SPAL, as he is so intelligent. At times he might seem slow or error-prone, but he reads the game so well and emerges in the long run.”
Allegri also reserved praise for Cuadrado, adding: “Cuadrado amazed me, in a good way. In the past he would sometimes struggle coming off the bench, but he made an immediate impact.”
“We must continue taking it one game at a time and try to win them all.”