Sergej Milinkovic-Savic and Mattia Zaccagni struck the goals which sank Juve and gave Maurizio Sarri's team a great chance of reaching the Champions League next season.
Lazio are five points ahead of Roma in third and most importantly seven in front of Inter Milan, who have been knocked out of the top four after drawing 1-1 at Salernitana, the only point they have collected from their last four matches.
The Roman side were deserving winners of pulsating match at the Stadio Olimpico which was won by Zaccagni's brilliantly taken goal seven minutes after half-time.
Italian winger Zaccagni was a menace all night and ended a superb team move by sweeping home his 10th goal of the season from Luis Alberto's wonderfully disguised flick.
Zaccagni had set up Milinkovic-Savic's 38th-minute opener, which was cancelled out almost immediately by Adrien Rabiot's bundled leveller, and also had a goal ruled out for offside just after putting Lazio ahead.
The hosts' win is also great news for Napoli, whose huge league has been cut back to 16 points but now no longer have to worry about seventh-placed Juve.
The Turin giants, who pushed for a second equaliser are hoping to have a 15-point penalty for illicit transfer activity revoked later this month but even if they succeed they would only be a point ahead of Lazio.
Massimiliano Allegri's side face Sporting Lisbon in the first leg of their Europa League quarter-final on Thursday with their hopes of making Europe through the league dented.
- Dybala fires Roma third -
Dybala has been Roma's talisman since arriving as a free agent last summer, and he was once again key for the capital club when he confidently netted his 11th league goal of the season in the eighth minute in Turin from the penalty spot.
The Argentina international's strike was enough for Jose Mourinho's solid side to leapfrog both Milan and Inter Milan.
It was a classic Mourinho-style performance from Roma, a traditionally flaky team who have become an extremely well-drilled outfit and could make Europe's top competition next season as a result.
"We have a limited squad and we're in the last eight of a Europa League which seems more like a Champions League this year, we're playing three times a week," said Mourinho to DAZN.
"That's a problem for us, but I can't think like I'm at a little team... let's go game by game and we'll see where our limits are."
Smart second-half finishes from Nicola Sansone and Riccardo Orsolini at Atalanta moved eighth-placed Bologna to within five points of their opponents, who sit sixth and in the Europa Conference League spot.
Bologna have not featured in a major European competition since reaching the third round of the UEFA Cup in 1999 -- although they did win the now defunct Intertoto Cup in 2002 -- but were excellent at the Gewiss Stadium.
Thiago Motta's team are two points ahead of Fiorentina, whose winning run ended at nine matches after M'Bala Nzola's 13th goal of the season gave Spezia a 1-1 draw in Florence.
An incredible Eldor Shomorodov miss late on cost 17th-placed Spezia, who are now just four points above the relegation zone after Adolfo Gaich's stoppage-time strike gave Verona a potentially huge 2-1 win over Sassuolo.
Sampdoria are heading towards Serie B however after two late goals from Luka Lochoshvili and Leonardo Sernicola gave Cremonese a dramatic 3-2 away win and left their distraught hosts bottom of the division.