They had earlier looked like cruising to a first Champions League win of the campaign when Ismaily and Taison scored in the space of two first-half minutes in Germany.
Hoffenheim had other ideas, though, pulling one back almost straight away through a fine Andrej Kramaric goal and then drawing level after 40 minutes thanks to Steven Zuber's header.
Adam Szalai was dismissed for Hoffenheim – who can no longer qualify from the group – just before the hour and Taison struck again in stoppage time to secure three vital points.
"Now everything is in our hands," Fonseca told a news conference.
"We have a good chance to qualify but we need to win our final game. It will be very hard because Lyon are a great side.
"They showed it again as they avoided defeat to Manchester City again. But we will fight until the end."
Despite Szalai's dismissal, Hoffenheim had a host of golden opportunities to put the result to bed before Taison's late winner.
Zuber thundered an effort against the crossbar from distance, while Nico Schulz and Reiss Nelson both blazed wide from superb positions.
It means their wait for a first ever Champions League win goes on and coach Julian Nagelsmann was left to rue his side's wastefulness in the closing stages.
"I don't believe it's possible to play better with 10 men than we did," he told reporters.
"Had we managed to take advantage of our clear-cut chances, it would have been enough for the win. The final blow in the 92nd minute was brutal."
Schulz, whose glaring miss proved so decisive, added: "I am angry that I missed the open goal. Nevertheless, we played well even when a man down.
"It is our way of playing to go all out for a win, even with a man down, but in the end we were punished for that."