Adebayor's 32nd minute strike not only helped seal Algeria's fate as the first side to be eliminated after two defeats, it also sent Ivory Coast into the quarter-finals as Group D winners.
Togo's second goal in the second minute of stoppage time from substitute Dove Wome clinched the victory late into the night after the match was halted for 13 minutes while a phalanx of men battled to straighten a leaning goalpost.
They had to remove the whole goal frame from its supports and re-erect it after Algeria's Adlene Guedioura pulled the goal out of position when he clung on to the net for support after another failed attempt in the 86th minute.
The win was only Togo's third in 19 matches in the finals and their first since the trauma of the Cabinda incident in Angola in 2010 when two members of their entourage were killed when gunmen attacked their bus.
Togo withdrew from those finals and did not qualify for last year's tournament in Gabon and Equatorial Guinea. They opened this tournament with a 2-1 defeat to Ivory Coast, but this victory puts them within touching distance of the last eight.
After two matches Ivory Coast lead the standings with six points, Togo and Tunisia have three and Algeria have none. Togo and Tunisia meet on Wednesday to decide who goes through with the Ivorians, who face Algeria.
While the 2-0 win was a triumph for Togo, it was a personal success too for Adebayor as he was left out of Didier Six's original squad but was brought in after the French coach was overruled by the FA president who ordered him to include the talismanic striker.
He made up for missing what should have been a certain goal in the second minute of their opening match against Ivory Coast, with an emphatic finish against Algeria after breaking free of the defence and firing low past keeper Rais Mbolhi.
The goal came against the run of play as Algeria had dominated the opening half-an-hour with the clever Sofiane Feghouli pulling the strings.
However none of their attempts produced a goal and with time running out Wome ran on to a loose ball and fired home the second to bring a long, emotional and at times farcical night to a close.
Algeria, despite having the second-best FIFA ranking (22) of all 16 teams in the tournament behind favourite Ivory Coast (14), flattered to decive in both games they played.
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1