The La Liga leaders held a commanding advantage heading into their second leg in Italy after sealing a 4-1 win at Camp Nou last week.
But Barca fell apart as goals from Edin Dzeko, Daniele De Rossi and Kostas Manolas sparked a remarkable comeback from Roma.
Dzeko opened the scoring in the sixth minute after he latched on to a lofted through ball from De Rossi and capitalised on an error from Samuel Umtiti.
Umtiti clearly had the run on Dzeko but suddenly stopped, which allowed the former Manchester City striker to race through and finish.
The French defender has been criticised for his recent performances following speculation surrounding his future with Barcelona.
Umtiti has confirmed Manchester United are interested in signing him this summer, with Jose Mourinhos side able to take advantage of a €60 million (£52m) release clause in his deal with Barca.
More: Manchester United FC