Coach Massimiliano Allegri rested most of his key players with an eye on the second leg of their Champions League quarter-final against Ajax, but his young team failed to get the job done.
Moise Kean put Juve in front in the first half, turning in a shot from Joao Cancelo to score for the fourth straight Serie A game, the 19-year-old becoming the youngest player to do so in the era of three points for a win.
Kevin Bonifazi levelled with a header after the break, though, and SPAL skipper Sergio Floccari finished well to give his side a massive boost in their fight against relegation.
Juve's experimental line-up initially struggled and SPAL, who have now won their last three home league games, enjoyed the better of the opening exchanges before Juve took the lead on the half-hour mark.
A shot from Cancelo looked to be comfortable work for Emiliano Viviano but Kean was on hand to divert the ball away from the SPAL goalkeeper to surpass Mario Balotelli's Serie A record.
SPAL set about spoiling Juve's party by equalising in the 49th minute, Bonifazi getting up highest to head home Pasquale Schiattarella's right-wing corner.
Juve substitute Hans Nicolussi Caviglia forced a fine save from Viviano with a 20-yard curling drive, with Kean making way for Stephy Mavididi, indicating Allegri felt Juve had done enough.
He was badly mistaken, however, as SPAL took the lead through Floccari, who steered home after excellent work in the build-up from Alessandro Murgia.
Allegri sent on Federico Bernardeschi but Juve, who are 20 points clear at the top, could not find a leveller, with Mattia De Sciglio missing a header in stoppage time – and if Napoli win at Chievo on Sunday the title race will remain alive for a little longer.
Attention on Ajax costs Juve
Juve have known for some time that they will win the league again, with second-placed Napoli unable to exert as much pressure as they did last season under Maurizio Sarri.
Allegri therefore unsurprisingly had an eye on Ajax and his big names should be fresh for that game after sitting out the trip to SPAL, who moved seven points clear of the relegation zone.
Juve will now be watching Napoli's game on Sunday to see if they will be crowned champions this weekend.