Mark Ellis scored a late winner as Crewe inflicted a fourth straight defeat on Oldham.
Latics forward Matt Smith sliced wide from just six yards when unmarked and was made to pay when Mathias Pogba's deflected effort put the Alex ahead.
But the hosts drew level when Dan Taylor capitalised on a defensive error to drive home from 12 yards.
Crewe were not to be denied, and Ellis converted a close-range header from Byron Moore's cross to secure victory.
Sorry, we were unable to load match stats, please try again.