Sassuolo s Maxime Lopez, right, celebrates after scoring his side s second goal of the game during the Italian Serie A soccer match between Juventus and Sassuolo at the Allianz Stadium in Turin, Italy, Wednesday, Oct. 27, 2021 (AP)
Maxime Lopez struck in the fifth minute of stoppage time to hand Sassuolo its first-ever victory at Juventus. American Weston McKennie had canceled out Davide Frattesi's first-half opener.
Juventus is 13 points behind Serie A leader AC Milan after 10 matches. Third-place Inter Milan can close the gap to its city rival to seven points with a win at Empoli later.
Sassuolo moved up to ninth, just a point behind Juventus.
After a rocky start to Allegri's second spell in charge, Juventus had appeared to be back on track.
However, Domenico Berardi almost gave the Sassuolo the lead after McKennie had lost the ball, but his curled effort was finger-tipped round the post by Juventus goalkeeper Mattia Perin.
Paulo Dybala went even closer to the opener in the 37th, but his effort came off the right post and it was Sassuolo which took the lead a minute from halftime when Frattesi fired Gregoire Defrel's through ball into the bottom left corner.
Juventus appeared more determined after the break and Sassuolo defender Kaan Ayhan had to clear Juan Cuadrado's shot off the line with his knee with goalkeeper Andrea Consigli beaten. Moments later, Consigli parried Dybala's shot and the ball came to Federico Chiesa, who headed over.
The Bianconeri did get the equalizer when McKennie headed a Dybala free kick into the top right corner.
Juventus pushed hard for the winner and all the Bianconeri players were at the other end, leaving them wide open at the back when Lopez sprinted onto a long ball and managed to evade McKennie's last-ditch tackle and win the match with a chipped effort over Perin.
Atalanta recovered from an early scare to win 3-1 at Sampdoria and move level on points with Inter.
Francesco Caputo gave Serie A struggler Sampdoria the lead in the 10th minute, but an own goal by Kristoffer Askildsen and a Duvan Zapata header saw Atalanta turn the match around just 11 minutes later.
Josip Ilicic sealed the match with an unstoppable goal in stoppage time.
Elsewhere, Udinese drew 1-1 against Hellas Verona.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)