Joel Matip was the hero as the Liverpool defender rose to give the Reds their first three points in the Champions League this season.
With the match in the 89th minute, Matip's header from Kostas Tsimikas's corner just crossed the goalline at the Kop end to spark wild celebrations as a determined Ajax side were beaten at the last.
The Reds had been worthy of the win, but couldn't break the Dutch side down after Mohammed Kudus had cancelled out Mohamed Salah's first half goal, with the hosts seeing several opportunities come and go and striking the woodwork via a deflected Salah effort.