The Ghana defender helped his teammate Donis Avdijaj to score a late goal that proved to be not enough in Tuesday’s game
It was the on-loan Chelsea defender’s second assist of the season in his seventh start and 13th overall appearance.
Both sides began with some shaky defending and Schalke missed a good opportunity to go ahead early as Yevgeni Konoplyanka profited from poor defending but could not find the target.
It was Hamburg forward Luca Waldschmidt that had the best chance of the first half but his shot was well saved by goalkeeper Ralf Fährmann.
Nicolai Müller scored the opening goal for the hosts on the hour mark after a well-worked run from a pinpoint counter-attacking move that left Schalke badly exposed at the back.
Substitute Bobby Wood grabbed the second goal with eight minutes left on the clock but there was to be lots of drama before the end.
Running down the left flank, Ghanaian defender Baba sent in a nicely measured cross to Donis Avdijaj which the 20-year-old attacker struck home with aplomb, his first for the club.
The game finished with Schalke unable to equalise as they remain on 18 points and in 16th place while relegation-battling Hamburger moved into 16th spot with 13 points.
Baba is expected to be listed in Ghana’s squad to the 2017 Africa Cup of Nations in Gabon as the Black Stars hope to end their 34-year-long wait for a senior title.