The defending champions took the lead in the Italian capital when Luis Suarez nodded home Ivan Rakitic's cross in the 21st minute.
However, a sensational long-range lob from Alessandro Florenzi pegged back the visitors before the break.
Barcelona piled on the pressure in the second half but, despite several close calls including Lionel Messi clipping the crossbar, were unable to score a second goal.
"When you play in these competitions with the physical and technical level there is and you meet a closed off side it's difficult, even if we did have our chances," Barca coach Luis Enrique told reporters.
"I think it was a game in which we deserved the win."
The biggest disappointment for Barcelona, however, was the leg injury suffered by Rafinha.
The Brazilian came on as a second-half substitute, but his involvement proved short-lived as a tackle by Radja Nainggolan meant he had to be replaced just a minute after his introduction.
"Without doubt, this has been the most unpleasant news of the night. I think it has also affected the pace of the game," Luis Enrique added.
"It looks bad and that's a very ugly information for us."