Juventus defender Giorgio Chiellini lost possession in his own half and Florenzi finished off a quick exchange of passes by gently chipping the ball over Wojciech Szczesny in the 79th minute. Dzeko then finished off a counter-attack in stoppage time.
The win left Claudio Ranieri's side in sixth place on 62 points, behind AC Milan on their head-to-head record. Needing a top four finish to qualify for the Champions League, they are three points behind third-placed Atalanta and one adrift of Inter Milan, who have a game in hand.
Inter hammer Bologna to lead Serie A after Dzeko brace
Juventus wore their controversial new strip for the first time with black-and-white halved shirts replacing the traditional stripes.
Both teams hit the woodwork in the first half and Cristiano Ronaldo had a 63rd minute goal ruled out after he was caught fractionally offside when he collected Paulo Dybala's pass before running on to slot the ball past Antonio Mirante.
"I'm not making any predictions, we are depending on others," said Roma's veteran coach Claudio Ranieri, who took over in March to guide the team through the rest of this season.
"We need to keep believing we can make the Champions League. We must play the final two matches with complete conviction and motivation."
Juventus, who wrapped up the title with five games to spare, wore their new strip despite many fans objecting to the decision on social media.
The new design, confirmed by the club shortly before kickoff as their new home shirt for next season, also features a pink pinstripe between the two halves. "Change is not to be feared," said the club on Twitter.
Cristiano Ronaldo, Alessandro Florenzi, Roma-Juventus, Getty Images
Image credit: Getty Images
Roma goalkeeper Antonio Mirante made brilliant early saves to deny Juan Cuadrado and Paulo Dybala before Lorenzo Pellegrini hit the bar for the home side. Juve also hit the woodwork when Mirante somehow turned Dybala's drive onto the post before halftime.
Cristiano Ronaldo thought he had put Juventus ahead when he collected Dybala's pass before running on to slot the ball past Mirante but he was fractionally offside.
Instead, Juventus defender Giorgio Chiellini lost possession in his own half and Florenzi finished off a quick exchange of passes by gently chipping the ball over Wojciech Szczesny in the 79th minute.
Dzeko then finished off a counter-attack in stoppage time to hand Juve their third league defeat of the season.
"We enjoyed great supremacy in the first half and we should have created more chances," said Juventus coach Massimiliano Allegri.
Woodward 'more confident than ever' despite Man Utd's financial losses
Parker: Man United won’t win the league until they sort out their midfield