Roma battled from the outset with Gianluca Mancini forcing an early save from United ‘keeper David De Gea, and Henrikh Mkhitaryan nodding the resulting corner into the side netting.
Cavani repeatedly proved dangerous, pouncing on a Roger Ibanez blunder to rattle the bar and then forcing a save from Roma keeper Antonio Mirante.
The Uruguayan finally broke through six minutes before the break, collecting a Bruno Fernandes through ball before firing past a beaten Mirante.
De Gea did well again to save from Mkhitaryan and Dzeko either side of the break.
The 33-year-old Dzeko got the equaliser in the 57th minute when he got his head to Pedro’s cross to beat De Gea.
Cristante got the second three minutes later, connecting with a Lorenzo Pellegrini to revive Roman hopes.
De Gea then pulled off a miraculous double save on from a Dzeko header and Pedro’s follow-up, and Cavani struck again after 68 minutes when he headed Bruno Fernandes’ centre past Mirante.
Roma did not give up and Telles’ own goal offered some consolation to a team set to be coached next season by former Man United manager Jose Mourinho.