Danilo had looked like proving an unlikely matchwinner for Pep Guardiola's side with a fine strike after 22 minutes of an otherwise frustrating day for City.
But after Raheem Sterling spurned a gilt-edged chance to put the game beyond doubt, the Clarets grew in confidence and earned their reward when Gudmundsson turned in Matt Lowton's deep cross.
City will rue their failure to make the most of their openings, with Sterling's opportunity one of a number to pass them by.
Burnley, for their part, were well organised throughout and they had already hit the woodwork through Aaron Lennon before their equaliser came.
Despite the wealth of talent in City's ranks, they also arrived short of numbers. David Silva became their latest injury victim in midweek and John Stones was again absent, having been ill recently, and so Guardiola named only six substitutes.
With record signing Aymeric Laporte on the bench, Vincent Kompany returned to the starting lineup and the City captain was soon in the thick of the action, clashing with both Ashley Barnes and Sam Vokes.
Burnley's back four, despite the absence of James Tarkowski, was well drilled and it required patience to break them down.
City controlled possession but their final pass was poor. Bernardo Silva did clip a dangerous cross into the box but Kompany could not get a touch and Sterling had no joy with a long-range shot.
Their breakthrough came from an unusual source after Sterling won a corner. The set-piece was taken short and Kevin De Bruyne found Danilo in space outside the area. He picked his spot and delivered a superb shot beyond Nick Pope.
City continued to press and Sergio Aguero had an effort blocked before Sterling and De Bruyne shot at the keeper.
Burnley were far more direct than City and they made efficient use of limited possession to create a couple of chances. On both occasions Ben Mee might have done better as he first forced a save from Ederson from a lobbed ball into the box and then headed wide following a corner.
City looked to kill off the game early in the second half but Burnley's back line held firm, denying Aguero and Ilkay Gundogan a sight of goal before Sterling fired over. City even looked to Danilo again as frustration grew but this time Pope tipped over.
Burnley retained a threat on the break and they almost snatched an equaliser when Lennon's thunderous shot was touched onto the post by Ederson.
That injected more urgency into City and Sterling should have scored when he was picked out in front of an open goal by Kyle Walker but he somehow sidefooted wide.
Burnley's defence would not yield and the hosts grew in threat in the latter stages. They eventually found their way through after 82 minutes when Gudmundsson raced onto Lowton's crossfield ball and touched past Ederson.
KINDLY DROP A COMMENT BELOW