The north African side are second in Group C with three points, one point more than third place Ivory Coast, who they play in a crucial last match.
Mathieu Dossevi put Togo in front with a low shot, but St Pauli forward Aziz Bouhaddouz headed in the equaliser.
Wolves’ Romain Saiss nodded in and Youssef En-Nesyri fired in the third.
Togo skipper Emmanuel Adebayor twice went close. He was denied by keeper Munir Mohan Mohamedi with the score 2-1 and also headed over a Dossevi cross early in the second half.
Click The Link for more information on Morocco Beat Togo at the Africa Cup of Nations 2017 In Gambon Their Final Group Game 3-1