Match ends, TSG 1899 Hoffenheim 1, Manchester City 2.
Manchester City manager Pep Guardiola described David Silva as "one of the best players" he has managed after the midfielder scored a dramatic late winner in City's Champions League win over Hoffenheim.
Silva capitalised on an 87th-minute defensive error by Stefan Posch before finishing into the far corner to give his side their first points in the competition this season.
The Spaniard also played a key role in Sergio Aguero's equaliser in the first half.
"He is one of the best players I have trained in my life," said Guardiola.
"I am a lucky guy to have many of them who are top players at Barcelona and Bayern Munich and he is in that list.
"In terms of mentality, I love the players who in the bad moments step forward and say 'I am here guys' and he is one of them.
"I am so happy for him. He deserves all of my respect."
City had fallen behind after only 43 seconds when Ishak Belfodil finished through the legs of goalkeeper Ederson for Hoffenheim.
They equalised six minutes later when Aguero poked home from Leroy Sane's cut-back but had been frustrated from then on, and looked like only taking a point from their trip to Germany before Silva pounced late on.
City had a strong claim for a second-half penalty turned down when Baumann brought down Sane in the box but referee Damir Skomina chose not to give a foul or book the forward for diving.
City climb to second in the table while Hoffenheim, playing in the Champions League for the first time this season, are bottom.
City's defeat against Lyon last month was their fourth in a row in the Champions League going back to last season's campaign, which ended with defeat in the quarter-finals by Liverpool.
But over the 90 minutes the English champions deserved the three points in Germany, especially given they should have had a penalty for the foul on Sane.
Silva was instrumental in Aguero's equaliser, playing a perfectly weighted pass to Sane on the left who then cut the ball back to the Argentine striker.
For his winner Silva robbed Posch when the defender tried to chest down Bernado Silva's cross inside the penalty area.
In the first half, City were dangerous on the counter-attack with Sterling and Aguero missing good chances, although Hoffenheim were more secure after the break.
But despite the win there were also concerns for Guardiola.
The early goal, which came when one pass between centre-backs Vincent Kompany and Nicolas Otamendi was enough to open up the defence, means City have now kept just two clean sheets in their past 17 away games in the Champions League.
There were other uncertain moments at the back with Hoffenheim finding joy down the side of the centre-back pairing, particularly on the left where Aymeric Laporte was playing at full-back.
City play Shakhtar Donetsk in back-to-back games in their next Champions League fixtures and their hopes of qualification were helped when the Ukrainian side drew 2-2 with Lyon later on Tuesday.
Despite being denied a valuable point, Hoffenheim were still impressive in their first Champions League home game - a match which had been labelled the biggest in the club's history.
At the start of the millennium the German club were in the fifth division, and 10 years earlier in the eighth tier, but they looked at home on European football's biggest stage.
In 2000, local businessman Dietmar Hopp - who had played for them as a youngster - invested in the club, sparking a run of promotions which eventually saw them become an established Bundesliga outfit.
Under highly-rated manager Julian Nagelsmann, the youngest boss in the competition's history at 31, they attacked City and looked dangerous - although this did leave them exposed on the counter-attack.
In the second half they were more compact defensively and looked like earning a draw until the late mistake.
Posch, 21, was one of a number of youngsters, along with fellow centre-back Justin Hoogma, 20, who started the game after injuries had ruled out their captain Kevin Vogt, first-choice defenders Ermin Bicakcic and Havard Nordtveit, and German international winger Nico Schulz.
Manchester City manager Pep Guardiola: "We had a little pressure because of our [opening] result in this competition, when you lose home games it is always tough and hard.
"After one minute we conceded a goal, it is not easy. The players deserve credit because we fought against absolutely everything for the result, the pressure and many other things.
"Maybe for the future it is going really well for us to live these kinds of situations because you cannot go through quarter-finals and semi-finals without living what today was.
"Manchester City is a fantastic club but does not have the history to live these situations. What happened today on the pitch gave me a lot of good signals for our future because we fought against absolutely everything."
Hoffenheim manager Julian Nagelsmann: "I have already spoken to Stefan Posch. He played a good game and their goal was not entirely his fault. He's a young lad and still has things to learn, and he will do that.
"Despite absences, we did well.
"It was extraordinary how we came into the break.
"We moved forward with possession and created good moments up front. To do that against a team like Man City is something we can really build on."
Match ends, TSG 1899 Hoffenheim 1, Manchester City 2.
Second Half ends, TSG 1899 Hoffenheim 1, Manchester City 2.
Sergio Agüero (Manchester City) is shown the yellow card.
Foul by Sergio Agüero (Manchester City).
Andrej Kramaric (TSG 1899 Hoffenheim) wins a free kick in the defensive half.
Attempt missed. Leroy Sané (Manchester City) left footed shot from the left side of the box is just a bit too high. Assisted by Riyad Mahrez following a fast break.
Attempt missed. Sergio Agüero (Manchester City) left footed shot from long range on the left is high and wide to the left. Assisted by Bernardo Silva following a fast break.
Foul by Sergio Agüero (Manchester City).
Stefan Posch (TSG 1899 Hoffenheim) wins a free kick in the attacking half.
Attempt blocked. Justin Hoogma (TSG 1899 Hoffenheim) left footed shot from outside the box is blocked. Assisted by Leonardo Bittencourt.
Attempt missed. Leonardo Bittencourt (TSG 1899 Hoffenheim) right footed shot from outside the box is high and wide to the right. Assisted by Andrej Kramaric.
Foul by Sergio Agüero (Manchester City).
Kevin Akpoguma (TSG 1899 Hoffenheim) wins a free kick in the defensive half.
Substitution, TSG 1899 Hoffenheim. Robin Hack replaces Kerem Demirbay.
Goal! TSG 1899 Hoffenheim 1, Manchester City 2. David Silva (Manchester City) left footed shot from the left side of the box to the bottom right corner.
Corner, Manchester City. Conceded by Stefan Posch.
David Silva (Manchester City) wins a free kick in the attacking half.
Foul by Justin Hoogma (TSG 1899 Hoffenheim).
Substitution, TSG 1899 Hoffenheim. Leonardo Bittencourt replaces Florian Grillitsch.
Foul by Sergio Agüero (Manchester City).
Kevin Akpoguma (TSG 1899 Hoffenheim) wins a free kick in the defensive half.
John Stones (Manchester City) wins a free kick in the defensive half.
Foul by Joelinton (TSG 1899 Hoffenheim).
Sergio Agüero (Manchester City) wins a free kick on the left wing.
Foul by Joelinton (TSG 1899 Hoffenheim).
Foul by John Stones (Manchester City).
Joelinton (TSG 1899 Hoffenheim) wins a free kick in the defensive half.
Substitution, Manchester City. Riyad Mahrez replaces Raheem Sterling.
Foul by David Silva (Manchester City).
Joelinton (TSG 1899 Hoffenheim) wins a free kick in the defensive half.
Attempt saved. Sergio Agüero (Manchester City) header from the right side of the six yard box is saved in the top centre of the goal. Assisted by Bernardo Silva.
Substitution, Manchester City. Bernardo Silva replaces Ilkay Gündogan because of an injury.
Delay over. They are ready to continue.
Delay in match Pavel Kaderábek (TSG 1899 Hoffenheim) because of an injury.
Kyle Walker (Manchester City) is shown the yellow card for a bad foul.
Foul by Kyle Walker (Manchester City).
Pavel Kaderábek (TSG 1899 Hoffenheim) wins a free kick in the defensive half.
Substitution, Manchester City. John Stones replaces Nicolás Otamendi.
Corner, TSG 1899 Hoffenheim. Conceded by Aymeric Laporte.
Foul by Vincent Kompany (Manchester City).