The win pushed City into second-place in the group on three points after two matches, one point behind Lyon, who later drew 2-2 with Shakhtar Donetsk
Manchester City overcame a first-minute setback to relaunch their Champions League campaign with what manager Pep Guardiola hailed as an "important" 2-1 victory at Hoffenheim, clinched by a late David Silva winner, on Tuesday.
The Premier League champions and current leaders, urgently needing a win after their opening week Group F defeat at home by Olympique Lyonnais, had been rocked by an Ishak Belfodil goal after just 44 seconds.
Sergio Aguero's equaliser seven minutes later seemed to have set them back on course as they dominated most of the match but the Bundesliga side, set up in an attacking 4-3-3 mode and dangerous on the break, held firm until Silva cashed in on a late defensive error.
David Silva's late goal wins it for Manchester City! pic.twitter.com/92cGcsfwif— ESPN FC (@ESPNFC) October 2, 2018
Guardiola felt it was another major learning experience for his side, who had looked as if they could be frustrated and deprived of a win they deserved when denied a clear-cut second-half penalty.
The win pushed City into second-place in the group on three points after two matches, one point behind Lyon, who later drew 2-2 with Shakhtar Donetsk. Ukrainian champions Shakhtar, City's next opponents, are third on two points.
"After losing the first game, it was important that we didn't lose today," he told BT Sport.
"We need to live this type of experience as a club to improve, to get better. You cannot make the next steps if you don't suffer or live this kind of experience, where you have to fight against everything."
Hoffenheim's home debut in the Champions League group stages at their Rhein-Neckar-Arena started perfectly for the high-flying 'village club' who have come so far so quickly in the Bundesliga, with Algerian Belfodil latching on to a neat through ball from Kerem Demirbay to slot home.
The quickest goal City had ever conceded in the competition was another shock to their system after their loss to Lyon, their only defeat of the season in any competition so far.
Normal service was quickly resumed, though, when a fine ball from Silva found Leroy Sane, outstanding on his return to Germany, who picked out Aguero to bundle home his eighth goal in 10 matches in all competitions this season.
Raheem Sterling, after a lightning end-to-end break, and Aguero, who was a livewire all evening, went close to putting City ahead as they piled on the pressure.
Yet after the break, 31-year-old Julian Nagelsmann's side, reflecting the enterprise of the youngest manager in Champions League history, held on staunchly as City ramped up their attacks.
It seemed as if Guardiola's men would be deprived of the win when Sane was clearly brought down in the penalty area in the second half when rounding goalkeeper Oliver Baumann but no penalty was awarded.
Asked about the penalty, Guardiola, who had been back on the touchline after serving a one-match European ban, said he would not comment because he did not want to end up back in the stands.
His side kept their patience, though, and David Silva's quick thinking, robbing central defender Stefan Posch in the box and shooting home a sharp left-footed winner, secured them the three points.
"We knew we had 15 points to fight for and we now have three. Now it's in our hands unlike before and, of course, we cannot make the mistake we did against Lyon," said Guardiola.
"We are not quite at the level of our opponent," a philosophical Nagelsmann told reporters. "We did a good job, tactically we gave a great performance, but they are a world-class team, you cannot forget that."