Matt Smith had given the League One side an unexpected lead after two minutes only for Liverpool’s captain for the day Luis Suarez to equalize 15 minutes later.
But Smith scored again on the stroke of halftime, before Reece Wabara extended his side’s lead two minutes after the break.
Joe Allen pulled a goal back for the Reds on 80 minutes, but the Premier League side was ultimately powerless to stop Oldham from progressing to the fifth round for the first time in 19 years.
Paul Dickov made two changes from the Latics’ defeat at Notts County five days ago, replacing Chris Taylor with Robbie Simpson and Chris Sutherland with Lee Croft. Oldham was also missing midfielder Dean Furman through Africa Cup of Nations duty, with lifelong Liverpool supporter James Wesolowski replacing him as captain.
Meanwhile, Brendan Rodgers named an attacking 4-2-4 lineup with Suarez standing in for Steven Gerrard as skipper, while Fabio Borini made his first start since fracturing his foot and Brad Jones replaced the injured Pepe Reina.
Prior to Sunday’s game, Oldham had played Liverpool four times in the FA Cup and lost on each occasion, but an apparent gulf in class didn’t show as Smith gave the home side a shock lead in only the second minute, meeting Youssuf M’Changama’s cross to unleash a fine header.
But Liverpool hit back on 17 minutes with its first chance of the game as Suarez eased his way into the Oldham penalty area and slotted the ball comfortably past Dean Bouzanis.
The simplicity with which 'Pool scored didn’t bode well for the home side and Suarez seemed to have grabbed a second after 23 minutes but his header was ruled offside.
Sterling was then denied by Bouzanis from inside the box, but there seemed to be a distinct lack of urgency about the Reds – and they duly paid the price before halftime.
Simpson had been a constant thorn in Liverpool's side but it was goalscorer Smith who once again made the difference. First, the forward had another header denied by a fingertip save from Jones before he doubled his tally on the stroke of halftime, pouncing on a loose ball after Jones went from hero to villain by spilling a straightforward cross.
Liverpool got things underway after the break and crafted an opportunity straight away, but Borini sent his shot high over the bar.
Oldham wasted no time in capitalizing as Wabara met a looping cross from substitute Carl Winchester to grab the game’s fourth goal, sending an unstoppable header into the far corner.
Gerrard and Stewart Downing were introduced by Rodgers on 55 minutes in an attempt to salvage the situation, but Liverpool offered little incisiveness as the home team defended for its life.
But Premier League club persisted and pulled a goal back through a deflected strike from Allen on 80 minutes.
A frantic finish ensued, with Gerrard hitting the crossbar from long distance, but the League One minnow held on to secure a famous cup victory and end Liverpool’s hopes of reclaiming the trophy for the first time since 2006.
Follow GOAL.COM on Twitter
- Sports & Recreation
- Steven Gerrard