Alvaro Morata missed a huge chance to equalise from close range, and El Shaarawy made it 2-0 when ex-Roma defender Antonio Rudiger failed to deal with Radja Nainggolan's long ball forward.
Chelsea had more shots - 14 to 13 - but were three behind when Diego Perotti cracked home from 20 yards after Blues defenders failed to close him down.
Roma should have led 4-0 when Chelsea's defenders all ran to Dzeko, who managed to square to a totally unmarked Perotti, but he fired over when he should have finished.
The Blues were hugely fortunate that Atletico Madrid's failure to beat Qarabag - their game in the Spanish capital ended 1-1 - means Chelsea are still likely to qualify for the last 16 from Group C.
Antonio Conte's side are four points above third-placed Atletico - and a win in their next Champions League game at Qarabag (17:00 GMT on Wednesday, 22 November) will take them through.
Roma, who are fifth in Serie A, now lead the group by a point. SHARE THIS STORY USING ANY OF THE BUTTON BELOW ⬇ PLACE YOUR TEXT ADVERT BELOW ⬇⬇⬇
Family Reveals Natural Cure For Staphylococcus, Syphilis, Gonorrhea And Other Related Infections. Click Here To See How New Discovery! Miracle Device That Cures DIABETES, BLOOD PRESSURE, STROKE, ARTHRITIS, PAINS, OBESITY And 50 Other CHRONIC DISEASES Without Drugs Or Herbs