Juventus were again heading for a 1-1 draw until Cristiano Ronaldo arrived from the bench, clear of coronavirus and in top form.
Andrea Pirlo's men had been held by both Crotone and Hellas Verona in the absence of the five-time Ballon d'Or winner before he finally tested negative on Friday and was cleared to make his comeback.
Ronaldo was still only fit enough to make the bench, however, and watched on as Alvaro Morata's opener was cancelled out by Tommaso Pobega in fortuitous fashion and the Bianconeri subsequently toiled.
Inevitably, Pirlo turned to his talisman and the 35-year-old netted just 126 seconds after his arrival, later converting a Panenka penalty for his second after fellow substitute Adrien Rabiot had all but secured a welcome victory.
Morata – denied three times by the offside flag against Barcelona in midweek – was grateful for a VAR review as he tapped in the opener from an onside position following Weston McKennie's unselfish square pass.
A second Morata goal was ruled out, however, and another decision went against Juve as Spezia levelled.
Pobega fired beyond Gianluigi Buffon with the aid of a deflection as the Bianconeri appealed in vain that M'Bala Nzola had made the telling touch while offside.
A sublime last-ditch Julian Chabot challenge denied Juan Cuadrado in front of the goal line late in the first half, but Pirlo did not wait long after the restart to introduce Ronaldo
The impact was immediate as the Portuguese rounded Ivan Provedel from Morata's pass to slot into the net.
While Juve survived another scare as Kevin Agudelo saw a leveller chalked off when Buffon spilled Chabot's header, Rabiot put the result beyond doubt, dancing through the Spezia defence and finishing via the post.
And when Federico Chiesa was clumsily tripped Paolo Bartolomei, Ronaldo clipped a cute spot-kick down the centre of the goal for number four.
What does it mean? Juve so reliant on Ronaldo
Any team would miss a player of Ronaldo's quality, but Juventus have won just seven of their 14 matches without the Portuguese since he signed in 2018 - hardly title-winning form.
Without a legal shot on target against Barca in the Champions League, the Bianconeri were struggling again until Ronaldo intervened to ensure they remain within four points of early leaders Milan.
He played just 34 minutes but no team-mate had more shots than his two – and both hit the net.
Morata making his mark
So frustrated by the officials last time out, Morata's perseverance paid off as he got his goal here – and an assist for Ronaldo to boot.
The Spanish striker was on the move throughout and, while that meant he was again caught offside on one occasion, going on to score, he caused Spezia real problems.
With Ronaldo back, there is the formation of an exciting partnership. Morata created two chances in total.
While one veteran got Juve over the line, another threatened to derail them.
A deflection understandably deceived Buffon for Spezia's goal, but he was fortunate to escape with the offside second equaliser, making a mess of one of only two saves.
Juve return to Champions League action at Ferencvaros on Wednesday, while Spezia does not play again until Saturday's trip to Benevento.