New Home kit 2018/2019
Online and InstoreBuy Now
The Blues were a goal behind in less than one minute when Ishak Belfodil sprung the City offside trap to finish under goalkeeper Ederson.
At that point City looked well placed to score more, but a resilient Hoffenheim performance coupled with one strong penalty appeal for Leroy Sane turned down, meant it looked like the game was heading for a draw.
But in the 87th minute Silva's brilliant reading of the play allowed him to pick-pocket the home defence and finish on the turn.
Although City's fans were put through a tense night, Guardiola is convinced matches like this can galvanise a team for future success.
"After losing the first game it was so important we don't lose today - the game was tight and in the end (we won)," Guardiola said.
"To win in Germany is always so complicated. It's a good three points, we fought against a lot of things, and that is why satisfying for the team.”
He added: "They (Hoffenheim) are so well organised defensively, with the ball they are so strong. It was not easy to find it, but at end we found the right moment to win the game.
"We need to live this experience to get better. You cannot make the next steps if you don't suffer, you don't live this experience - so this will be good for the future."
The boss confirmed City's medics would check on Ilkay Gundogan on Wednesday after the Germany midfielder left the play clutching his hamstring in the second-half.
Team news ahead of Manchester City's game against Hoffenheim...