Jamie Jones' goal and Charlie Kirk’s 98th minute strike stole all three points at Gresty Road.
Jonny Smith gave Latics the lead early in the second half, but Jones and Kirk made sure that all the points would stay at Crewe.
It was a quiet start to the contest, but it began to spring into life when a long ball found Charlie Kirk in space on the left and on the volley, he attempted an ambitious chip, but his effort landed on the top of Zeus De La Paz’s goal.
Latics then started to apply pressure on the hosts’ as they countered a Crewe attack which saw right-back Tom Hamer play a one-two with a teammate before racing towards goal. The 20-year-old tried his luck from range, and it went just past Will Jaaskelainen’s post.
The visitors’ continued to push forward, and this time Gevaro Nepomuceno played the ball inside to Jonny Smith, who drifted into the middle of the park, and the winger turned out before trying to curl an effort into the top corner, but the goalkeeper managed to catch him attempt.
Oldham defender Carl Piergianni stopped David Artell’s side from taking the lead as a cross was delivered from the left-wing into the box, the towering centre-half managed to head the danger away inside the six-yard box with a Crewe attacker just behind him ready to capitalise.
Shortly after the interval, Dino Maamria’s side took the lead as Danny Rowe held the ball up and produced a fine through ball to set Nepomuceno free down the right-wing and he played a low cross into the box and found Smith. The winger kept his composure to slot passed the goalkeeper to send the away end into chaos.
Just minutes later Crewe found an equaliser as Latics failed to clear their lines and the ball fell to Jones and his shot went straight at De La Paz, but the goalkeeper parried the ball into the back of the net.
De La Paz was called into action again, as Stephen Walker tried his luck from the edge of the box, but the goalkeeper got down well to deny the attacker.
Crewe searched for a winner and were rewarded in the 98th minute as Kirk danced through numerous Oldham defenders in the box before striking back across goal into the near post.
This result means that Crewe have done the double over Latics this season after a 2-1 win at Boundary Park in August 2019.
Crewe Alexandra 2-1 Oldham Athletic.
Attendance 5,271 (1,262 Away).
Crewe Alexandra XI – Jaaskelainen, Ng ©, Pickering, Wintle, Walker (Dale 66’), Jones, Kirk, Finney (Ainley 85’), Anene (Porter 57), Offord, Nottingham.
Subs – Richards, Porter, Ainley, Green, Hunt, Dale, Griffiths.
Oldham Athletic XI – De La Paz, Hamer, Wheater ©, Piergianni, Mills (Dieseruvwe 98’), Missilou, Sylla, Smith, Maouche (Branger-Engone 81’), Nepomuceno, Rowe.
Subs – Allen, Branger-Engone, Wilson, Fage, N’Guessan, McCann, Dieseruvwe.
Referee – Sam Purkiss.