City now have three points from their opening two games having ended a run of four successive defeats in this competition, while Hoffenheim are still looking for their first victory in Group F after drawing with Shakhtar Donetsk last month.
Hoffenheim went into the match having scored in each of their eight games this season, and the home side required just 44 seconds to go ahead in this fixture with Belfodil latching onto a through-ball before slotting a shot under the advancing Ederson from 14 yards out.
City wasted little time before going onto the offensive and an equaliser arrived in the eighth minute, with Leroy Sane biding his time in the penalty area before setting up Aguero to take a touch and force the ball inside the near post from close range.
The visitors were posing a constant threat going forward and Raheem Sterling had the chance to put his side ahead after sprinting clear of the defence, but the winger aimed his strike too close to Oliver Baumann who diverted the ball behind for a corner.
Nicolas Otamendi sent a header wide from the resulting set piece, and City kept up the pressure with Aguero volleying marginally wide of the far post after more fine work from Sane.
Aguero was then denied by a spectacular save from Baumann who was able to prevent the forward's effort from 20 yards finding the top corner, before the striker attempted a similar effort which cleared the crossbar five minutes before the break.
However, Hoffenheim improved as the first half drew nearer a close and Belfodil was able to capitalise on a poor back-pass from Aymeric Laporte before being denied by a smart save from Ederson.
Both sides were much more measured after the restart with it taking 10 minutes for either team to create a clear opening before David Silva poked wide of the near post from close range.
Fernandinho also had a long-range strike easily saved by Baumann, and City continued to struggle to put anything together in the final third as Hoffenheim began to match the visitors in all areas of the pitch.
Aguero had a close-range header saved by Baumann soon after the introduction of Bernardo Silva, but City were denied a clear penalty by the referee when Sane was tripped by the goalkeeper inside the area.
Riyad Mahrez was introduced for the final quarter-of-an-hour and the Algerian quickly looked to inject more pace into City's attacks, which was required with Hoffenheim dropping deeper as the game approached full time.
City finally got their second with three minutes remaining. Stefan Posch took too much time on the ball in his own area and was dispossessed by David Silva, who was able to lash a low shot into the far corner of the net.
Hoffenheim attempted to push for an equaliser, but City comfortably held out to get their Champions League campaign back on track ahead of their double-header with Shakhtar Donetsk.
HOFFENHEIM (3-4-3): Baumann; Akpoguma, Hoogma, Posch; Kaderabek, Demirbay (Hack 89'), Grillitsch (Bittencourt 82'), Brenet; Belfodil, Joelinton, Szalai (Kramaric 54')
MANCHESTER CITY (4-2-3-1): Ederson; Walker, Kompany, Otamendi (Stones 64'), Laporte; Fernandinho, Gundogan (Bernardo Silva 68'); Sterling (Mahrez 75'), D.Silva, Sane; Aguero