Real travelled to the Stadio Olimpico looking to exorcise painful memories of losing 2-1 twice in succession to the Giallorossi at this stage of the competition in 2008.
After weathering a frustrating first half in which Roma failed to finish off a series of promising attacks, Ronaldo broke the deadlock on 57 minutes when he ran on to Marcelo's chip to beat Wojciech Szczesny with a shot that deflected off Alessandro Florenzi.
To their credit, Roma dug deep to claim a share of the spoils and were unlucky not to earn a penalty when Florenzi came down under the studs-up challenge of Dani Carvajal.
Even after that decision, the hosts battled throughout a dominant late spell inspired by Egyptian winger Mohamed Salah, only to come up short.
More From This Section
It was inspiring stuff, but dozens of the 55,612 home crowd began leaving their seats five minutes from the finish when Jese flashed a shot across several defenders to beat Szczesny low at his far post.
Roma coach Luciano Spalletti had deployed a 4-3-1-2 formation which left no space for Bosnian striker Edin Dzeko, although he came on to replace Stephan El Shaarawy after he limped off in the second half.
Diego Perotti, signed in January from Genoa, was the driving force throughout, stealing possession, leading attacks and setting up Salah and El Shaarawy.
Real were restricted to a series of half-chances before the interval, the best of which came from Brazilian left-back Marcelo when he volleyed Ronaldo's clever lob just wide of Szczesny's far post.
El Shaarawy did well to run on to a long ball but came off worse when goalkeeper Keylor Navas rushed out to clear.
Lucky to escape the offside call, the Portuguese ran on
to Marcelo's lob, turned inside and unleashed a shot that came off Florenzi to leave Szczesny clutching at thin air.
Ronaldo looked inspired and he sneaked behind Roma's defence and ran onto Karim Benzema's chip, but his delivery sailed across the goalmouth with no takers.
Salah then dispossessed Marcelo in midfield and his pace took him past Sergio Ramos to fire low across the area, but Raphael Varane produced a timely block.
Roma were keeping the pressure on and when Nainggolan set up Dzeko on the edge of the area, the Bosnian held off his markers to set up William Vainqueur for a 30-yard drive that sailed just wide.
But Roma were finally subdued four minutes from time when Jese used several players as a screen before sending an angled drive past Szczesny and into the far corner.