Massimiliano Allegri's side needed just a point to win the title, but will have to wait for next Saturday's match against Fiorentina, unless Napoli fail to beat Chievo on Sunday.
Moise Kean turned home Joao Cancelo's wayward shot to put Juventus in front.
Kevin Bonifazi headed in the equaliser just after half-time, before 37-year-old Sergio Floccari scored the winner.
Juve defender Andrea Barzagli, 37, confirmed after the game that he will retire at the end of the season.
It was SPAL's first win against the Italian champions since February 1957 and only Juventus' second league defeat of the season.
Allegri rested several first-team players, including top scorer Cristiano Ronaldo with Tuesday's Champions League quarter-final second leg at home to Ajax in mind. They drew 1-1 at the Johan Cruyff Arena last week.
It was their youngest starting line-up in Serie A for 20 years, with an average of 25 years and 104 days. Their 17-year-old centre-back Paolo Gozzi Iweru became the youngest player to feature in Italy's top flight this season.
With the game at 1-1, there was also a Juventus debut for England U20 striker Stephy Mavididi.
The 20-year-old who joined the Italian club from Arsenal in August, came on in the 68th minute.
Juventus have won every Italian league title since moving to their current stadium in 2011 and a record 34 in total.
Despite the defeat they are 20 points clear of second-placed Napoli, who have seven games remaining this season.