Oldham gave Liverpool a fright, but the Reds fought back to book their place in the fourth round of the FA Cup.
Robbie Simpson struck from 30 yards to evoke hopes of a giantkilling act.
Liverpool were level within two minutes when Craig Bellamy deflected in Jonjo Shelvey's shot and Steven Gerrard put the Reds into the lead from the spot.
Shelvey stroked home a third, Andy Carroll's long-range effort made it four and Stewart Downing fired in a rebound in the final minute.
However, the evening was marred by an incident towards the end of the match when a verbal insult was seemingly aimed at Oldham's Tom Adeyemi by a spectator - which ended with the 20-year-old breaking down in tears.
It was a sad end to an enthralling evening.
The scoreline suggests a fairly comfortable run-out for Kenny Dalglish's side, but Oldham played their part in an absorbing contest.
With more composed finishing, and a touch of luck, they might even have added Liverpool to their list of FA Cup scalps in recent years.
Everton and Manchester City have suffered at the hands of the Latics in previous seasons, and Paul Dickov's side showed all the battling qualities that helped their manager unnerve plenty of top-flight defenders in his playing days.
They raced out of the blocks and could have been 3-0 up inside the first 20 minutes.
Luca Scapuzzi, on loan from Manchester City, should have done better when well-placed, while Shefki Kuqi went on a powerful run that ended with a shot into the side netting.
And after Adeyemi was left unmarked to head over the bar, it came as no surprise when the visitors went into the lead.
Simpson was the Latics hero, striking a left-footed shot into the back of the net from 30 yards out.
It was a special goal which was no more than Dickov's side deserved for their positive approach to the tie.
Liverpool were stunned, but it did not take them long to wake from their slumber.
First, Bellamy deflected Shelvey's shot into the net - a strike with an element of fortune attached to it - and then Gerrard slotted home from the spot after Maxi Rodriguez was pushed in the area.
Oldham's spirit was not broken, however, and they started the second half brightly with Jean-Yves M'voto shooting wide before Zander Diamond summed up his side's spirit with a fine defensive challenge on Dirk Kuyt.
Bellamy was becoming more influential with his pace down the flanks, and Martin Kelly could have extended Liverpool's lead but his header was superbly saved by Alex Cisak.
Oldham refused to lie down and they threatened to bite back when Adeyemi, who was particularly impressive, skied over after being picked out by substitute Josh Parker.
But the dream was put to bed in the 69th minute when Shelvey stroked home from 10 yards after more good work from Bellamy.
Following the Adeyemi incident, Oldham lost their way and under-fire striker Carroll hit an instinctive 25-yard shot to boost his flagging confidence before Downing wrapped up victory with his first goal in a Liverpool shirt, reacting quickest after Cisak had saved Jon Flanagan's effort.
The two late goals added an unfair gloss to the scoreline, but the Latics will go home with their heads held high. Their performance was a credit to lower league football.