Cengiz Under's strike and a string of Alisson saves had kept Roma in the tie in the 2-1 away first-leg defeat, allowing Eusebio Di Francesco's men to edge to victory in the second leg and reach the quarter-finals despite a dismal display in which Dzeko's victor was scarcely deserved.
The Bosnian took a defence-splitting pass from Kevin Strootman into his stride and beat the offside trap before he steered the ball into the far corner with the outside of his foot, past the advancing Pyatov.
Edin Dzeko credited his Roma team-mates for a "patient" performance as they dumped Shakhtar Donetsk out of the Champions League.
Shakhtar were reduced to ten men after Ivan Ordets recklessly pulled down Dzeko as he was bursting through on goal. "I don't have a preferred opponent: they are all strong teams, but we will play to win against anyone".
15 - Manchester United haven't managed to score more than one goal in any of their last 15 Champions League encounters with Spanish opposition (seven goals in total).
Shakhtar were unlucky not to get an away goal of their own early on when Roma's Alessandro Florenzi nearly headed an in-swinging free-kick into his own net with a glancing clearance.
Moments later, a fracas broke out on the pitch after two Shakhtar players pushed a ballboy over the advertising boards for holding on to the ball in a chaotic finish to the match.
The champions of Ukraine went for broke in the final five minutes of the match, knowing an equaliser would send them through to the last eight, but the Eternal City outfit held on for a narrow victory.
'We've won five of our last six in the league and we're into the last eight in Europe, so I am seeing growth in this team, ' the Roma coach said, as quoted on www.uefa.com.
"Everyone deserves a standing ovation because we all gave absolutely everything tonight and we fully deserve to be in the quarter-finals", Dzeko was quoted as saying by Sky Sports Italia.