Alvaro Morata thought he had completed the comeback early in the second half, but his header was brilliantly saved by Andrea Consigli only for the goalkeeper to let one through his legs as Kean turned smartly and struck the winner two minutes from time.
"The team has grown a lot, but we have to manage games better," Juve coach Massimiliano Allegri told Sky Sport Italia. "I don't think about changing a lot of players, but we will need one or two players [signings]. The team is having a good season.
"There is a bit of tiredness, but I thank the guys. Now we have a good advantage over the fifth spot, we are one point behind Napoli and we have to keep working."
Mid-table Sassuolo, who have 46 points and little to play for, were determined to make Juve's life hard in Emilia-Romagna, and would have gone in front earlier than they did had Szczesny not made fine saves to deny Domenico Berardi and Raspadori.
Their opener did come through the lively Raspadori, a goal Szczesny will not want to see again, as the strike went past him at his near post from a tight angle.
A goal out of nowhere for Juve got them back in the match as Dybala, who has announced he is leaving at the end of the season, gave a reminder of his quality with his ninth league goal of the campaign.
It was all Juve in the second half, with Consigli denying them time and again before Kean stepped off the bench to win it late on.
The victory means Juventus have gained 12 points from losing positions in Serie A since the start of 2022, at least five more points than any other team in this period.