Everton brought League One Oldham's FA Cup run to an end as the Premier League side showed their superiority to earn a last-eight tie against Wigan.
Kevin Mirallas guided in Darron Gibson's cross to put Everton ahead.
The hosts had two scares when Jose Baxter hit the post and Gibson handled in his own area, but Leighton Baines later converted from the spot.
Leon Osman nodded in Steven Pienaar's cross and despite a towering header from Matt Smith, Oldham fell short.
Having beaten Liverpool in the fourth round, and earned the replay with Everton via a stoppage-time Smith header earlier this month, the Latics could not contain opponents who sit 58 places above them in the league ladder.
Matt Smith's late consolation was his fourth against either Liverpool or Everton in their cup run
Victory for Everton came as a result of more incisive attacking play in the final third and it ended a sticky period as they claimed their first win in five league and cup games.
It keeps manager David Moyes's quest for a first trophy in his 11 years at the club alive, having guided Everton to last year's semi-finals and the final in 2009.
Contrastingly for Oldham caretaker boss Tony Philliskirk, this was his first defeat during his five-game period in charge.
Although there are uncertainties surrounding Moyes's position as he delays a decision about his future until the end of the season, this was a display which could further help Philliskirk's cause to make his position permanent.
Despite going into the break two goals behind, Oldham were certainly not outclassed. Everton simply passed the ball better and were quick to get it wide as they created the majority of the chances.
In addition to his penalty, Baines also had a shot tipped around the post by Oldham goalkeeper Dean Bouzanis, while centre-back James Tarkowski was fortunate not to concede a spot kick when he pulled Nikica Jelavic's shirt.
If anything, Everton were perhaps guilty of not testing Bouzanis more, but in deciding to pass rather than shoot in the build-up to the opener, Gibson made the right decision.
When the ball was recycled back to the Republic of Ireland international on the right, he crossed for Mirallas to meet on the half-volley for a cute finish.
Everton go clear of Oldham
This win now puts Everton in front on their head-to-head record with Oldham. They have won 15 to the Latics' 14 of their 42 games spread over 105 years
Former Everton youth-team player Baxter had impressed in Oldham's FA Cup run this season, and he almost made it a sweet homecoming when he struck the post moments later, while Gibson was fortunate when Phil Jagielka smacked a clearance straight into the midfielder's arms.
Referee Michael Oliver was close at hand to wave Oldham appeals away but had little hesitation in pointing to the spot when the ball struck Brown's arm following a right-wing cross. Baines stepped up to fire under Bouzanis for his seventh goal of the season.
Moyes's side could have gone further in front following the restart but when they did, it was actually Oldham who were in the ascendancy.
Smith, who scored twice against Liverpool in the previous round, came on for Chris Iwelumo and climbed highest from a corner to head in.
Unfortunately, Everton had already added a third by that stage, Bouzanis misjudging Osman's flicked header following Pienaar's left-wing cross.
Gibson could have made the margin greater and although the scoreline was a fair reflection of the game, Oldham will now turn their attentions to widening a one-point gap above the League One relegation zone.
Everton assistant manager Steve Round:
"I thought Oldham put a right shift in and pushed us all the way. They were a credit to the manager and to themselves. I thought they really acquitted themselves right and made it very tough.
"Having said that, I think we matched them for the attitude and then your quality comes through at the end. You saw that with one or two of the goals that we scored and unfortunately we missed a couple of chances to maybe make it a bit more clear-cut."
Oldham caretaker boss Tony Philliskirk:
"My feeling is one of pride, first and foremost. When we went 3-0 down it would have been very easy for people to be thinking it was going to be four or five but I thought we responded magnificently in the second half.
"Ironically, when they scored the third goal we were probably having our best spell in the game. It was disappointing to concede that third but the lads kept going, Matt Smith's got another great goal and I thought we played some smashing stuff in the second half."
- 24 Howard
- 03 Baines
- 06 Jagielka
- 15 Distin
- 18 Neville
- 23 Coleman
- 04 Gibson
- 21 Osman
- 22 Pienaar (Hitzlsperger - 89' )
- 07 Jelavic
- 11 Mirallas (Naismith - 84' )
- 01 Mucha
- 05 Heitinga
- 34 Duffy
- 08 Oviedo
- 16 Hitzlsperger
- 14 Naismith
- 27 Vellios
- 13 Bouzanis
- 02 Brown (Wesolowski - 76' )
- 03 Grounds
- 05 Mvoto
- 06 Tarkowski
- 07 Croft
- 08 Furman
- 15 Obita (Simpson - 55' Booked )
- 09 Iwelumo (Smith - 55' )
- 18 Barnard
- 20 Baxter
- 01 Cisak
- 26 Winchester
- 04 Wesolowski
- 29 Mellor
- 10 Simpson
- 14 Smith
- 21 Millar