The Blues had trailed to a 16th-minute penalty before Sane struck either side of the break in an entertaining Champions League clash.
What happened?
City started a little tentatively, with a few stray passes inviting Hoffenheim pressure.
The visitors had a couple of half-chances in the opening 12 minutes and went close to breaking the deadlock on 14 minutes when Andrej Kramaric wriggled himself half a yard of space before curling a shot towards the top right-hand corner only to see Ederson make a superb fingertip save around the post.
The next time the Germans attacked, however, it resulted in a penalty for the visitors as Aymeric Laporte tugged back Benjamin Hubner as a mis-hit shot looped up in the six-yard box.
Kramaric tucked home the spot kick to give Hoffenheim the lead – one they probably just about deserved on the balance of play.
The Blues almost responded within minutes, as Gabriel Jesus rose to head Leroy Sane’s corner against the post and moments later, John Stones saw his header from close range well saved by Oliver Baumann.
Ilkay Gundogan’s excellent free-kick was headed onto the crossbar by skipper Nicolas Otamendi on 34 minutes as the Blues’ rotten luck continued.
City were working hard without reward until first-half stoppage time when, finally, a brilliant free-kick levelled the scores.
Gabriel Jesus was scythed down 25 yards out and Sane, always a keen volunteer for free-kick taking, placed the ball down, stepped back before unleashing a superb shot over the wall and past Baumann.
City, who reverted to a 4-3-3 after playing 3-5-2, came out after the break with their tails up and went close to talking the lead several times in the opening 10 minutes – but the pick of the bunch was Raheem Sterling’s 60-yard dash forward in a three-on-one break, before squaring to Sane – who passed to Bernardo and his effort was scrambled clear.
It was a case of slightly over-egging the pudding – but Sane and Sterling soon made amends as they combined to slice the Hoffenheim defence apart with Sane making no mistake from close range.
Hoffenheim threaten occasionally, chasing the game as they had to, but leaving spaces at the back that the Blues continually looked to exploit.
And on 76 minutes, the Blues almost spectacularly added a third as Sterling‘s clipped cross was met on the volley by Phil Foden only to be denied by a superb Baumann save.
Foden repaid the favour by cross for Sterling to volley narrowly wide with five minutes left on the clock.
All in all, a good display and a fine way to bounce back from the weekend loss to Chelsea.
Star man: Leroy Sane
Not a difficult choice!
Honourable mentions for the tireless work of Gabriel Jesus and Raheem Sterling, too.
What it means…
Mission accomplished - City win the group and will be joined in the Round of 16 by Lyon.
READ: When is the Round of 16 draw?
Pep reaction...
The performance…
“Incredible. Today finished group stage in best way. Best 16 teams in Europe. We try to arrive in February in the best condition with players fit.
Big compliment for this group because every group is tough, and we did it so well.”
Raheem Sterling’s performance:
“Top. Unfortunately, the finishing or last pass (wasn’t there) but he is young. He will improve. His performance was excellent.”
Full backs. Walker introduction
Everybody’s important. Kyle is important. Danilo is injured. We decide to make build up with 3 three the back - that’s why we played John there. He can do it but he didn’t feel comfortable in first half with his knee. Not a big issue. Kyle started to warm up and at the break, we made the sub.
“Stones is not a full back. Kyle is, but I admire the effort to try to do it.”
Phil Foden performance…
“They scored a goal. Before that moment, we were flat, they were better. Not because they did special things, but we were flat.
Hoffenheim, I know a bit about how they play. If they run, you cannot stop.
After the penalty, we were good. Created a lot of chances, hit the post, many counter attacks. Need to improve on that in future.
Second half, team was much better. Not just Phil but in general over 90 minutes, Phil was outstanding. I never had doubts. The quality he has with the ball. Looks skinny but really strong. Huge talent. England has a diamond.
Against German teams it is so demanding, but he played like a man.”
Sane display…
“Really proud. I am a lucky guy.”
What’s next?
The Blues return to Premier League action on Saturday, kick-off 12.30pm against Everton.
Victory will put City back on top, with Liverpool hosting Manchester United 24 hours later.