Maurizio Sarri's side were clinical in a surreal atmosphere – supporters have been barred from attending matches until April 3 amid coronavirus precautions – securing a third consecutive league win after Ramsey netted for the second game running, while substitute Dybala doubled the hosts lead with a scintillating strike.
Cristiano Ronaldo failed to find the net for the first time in 12 league matches on a night when he could have set a new Serie A record goalscoring streak, the Portugal star missing two excellent late chances.
But there was no hiding Sarri's satisfaction as his charges bounced back from their Champions League defeat to Lyon with a deserved victory against one of their title rivals, who are now nine points behind, although Antonio Conte's side have a game in hand.
Samir Handanovic, on his return from a hairline fracture of his finger, made a smart reaction save to keep out Matthijs de Ligt's close-range header after seven minutes, and Ronaldo then fired a shot into his midriff from 20 yards.
Juve's strong start continued, with Blaise Matuidi's angled drive forcing Handanovic into a low, diving stop, while Inter were restricted to shots over the crossbar from distance by Nicolo Barella and Antonio Candreva.
Marcelo Brozovic gave the champions their first real scare when he struck a curling effort towards goal from outside the box that Wojciech Szczesny parried away, ensuring the sides went in level at the interval.
Juve's breakthrough came nine minutes after the restart when Alex Sandro played Matuidi into the box and his cross was blocked by Alessandro Bastoni, only for Ramsey to pounce on the loose ball and fire it in off Stefan de Vrij's leg from six yards.
Dybala replaced Douglas Costa five minutes later and soon made his mark on the game, immaculately trapping a long pass before exchanging a one-two with Ramsey, turning Ashley Young inside the box and firing into the corner of the net with the outside of his left foot.
Conte threw on Christian Eriksen as Inter sought a way back into the game and he sent a rising drive narrowly over Szczesny's crossbar, but the visitors' evening took another turn for the worse when Daniele Padelli was sent off from the bench following Brozovic's foul on Matuidi.
Ronaldo fired two late shots narrowly wide of the target as he just missed out on claiming another piece of history, but the night nonetheless belonged to Juve.
What does it mean? Inter cut adrift
The Nerazzurri are now playing catch-up in a big way, with Conte's side failing to show the kind of form that made them front-runners in the title race before the turn of the year.
Juventus, meanwhile, are playing some of their most exciting football of the campaign and will feel confident about going toe-to-toe with Lazio – a point behind – for the Scudetto.
Ramsey finding his feet
This was only Ramsey's ninth league start of the season but – having also netted against SPAL – he more than justified his place, scoring the opener, assisting the second, and frequently putting Sarri's men on the front foot with his vision and quick thinking.
Higuain's drought continues
Without a Serie A goal since January 6, Gonzalo Higuain was largely a bystander despite Juve spending long spells camped in and around Inter's box, with Ronaldo so often the preferred passing option.
Inter are at home to Getafe in the Europa League on Thursday ahead of their clash with Sassuolo three days later, while Juventus travel to Bologna in Serie A on Friday, with Lyon visiting in the Champions League after that.