Hamburg looked shaky but all Bayer could muster for its wave of attacks was a first-half goal by Patrick Helmes.
"We have the same problems as Leverkusen," said Hamburg coach Martin Jol, "and we do not have a perfect team yet."
Demba Ba's hat trick gave Hoffenheim a 3-3 tie at VfB Stuttgart on Saturday, while a pair of second-half goals by Edin Dzeko gave Wolfsburg a 2-1 win over Hertha.
Bayern Munich's loss to Cologne was its third defeat in four league matches since the winter break and prompted fans to whistle their displeasure at the Allianz Arena.
"Quite a bit went wrong today," Bayern coach Juergen Klinsmann said. "This defeat angers us and we have again missed the chance to go top of the standings."