A stunning finish brought an end to a frustrating encounter for the Bianconeri, whose season has hit another stumbling block after six straight wins heading into Monday's (AEDT) draw at Inter Milan.
Lopez's breakaway winner decisively put Sassuolo, which was previously without an away Serie A victory at Juve, in front for the second time, having earlier led through Davide Frattesi.
Weston McKennie's thumping header got Massimiliano Allegri's men back on terms and seemed to set the stage for a second home goal, but it was Sassuolo that was celebrating deep in stoppage-time.
The game ended as it began – in breathless fashion. The visitors recovered from a rocky start to go close through Domenico Berardi, whose curling effort tested Mattia Perin, and came through another strong Juventus spell to lead on the stroke of half-time.
Paulo Dybala had hit the post and Federico Chiesa lashed over in the 10 minutes before the break, but an incisive move at the other end gave Frattesi a chance he would not pass up, finishing coolly past Perin.
Giacomo Raspadori was not so accurate when he might have doubled Sassuolo's advantage in the second half, a scare that stirred the hosts.
Juan Cuadrado's blast was cleared off the line by Kaan Ayhan, before Andrea Consigli beat away Dybala's drive and got back to his feet in time to see Chiesa nod over.
McKennie appeared the unlikely saviour then, meeting Dybala's free-kick with a fine header that flew beyond Consigli.
But Juve's pursuit of a second left Lopez in the clear to run on to Berardi's sublime pass, hold off the recovering McKennie and dink over Perin for a memorable Sassuolo triumph.