Liverpool had won a second straight Premier League game for the first time in more than two months with a 3-1 victory at Bolton earlier in the day, but Everton maintained the advantage over its city rival with two goals by Aiyegbeni Yakubu and one from Tim Cahill.
Everton has 53 points after a win that was crucial in the race for England's fourth Champions League spot.
"We want to finish in the first four. We knew Liverpool won today and we wanted to keep the pressure on," Yakubu said. "There is a long way to go. Ten games. We'll see where we go."
Everton got off to a perfect start when Nigeria striker Yakubu scored his 11th league goal this season after just 50 seconds.
Midfielder Lassana Diarra fouled Yakubu straight after the kickoff and Steven Pienaar flicked the resulting free kick into the area. Joseph Yobo flicked the ball on and Yakubu headed it past goalkeeper David James from six yards to score against his former club.
Everton dominated possession and chances but Jermain Defoe equalized seven minutes before halftime when he got the faintest of touches to a left-footed cross from the right by Glen Johnson.
Everton manager David Moyes responded by bolstering his attack with Andy Johnson and the former England striker had a goal ruled out for offside before Cahill put the home side back in front in the 73rd with a leaping header from Pienaar's cross.
Johnson then helped set up Yakubu to make it 3-1 with nine minutes left. Johnson sent a long pass from halfway to his fellow striker, who controlled the ball and cut inside defender Sol Campbell to hit a right-foot shot between James and the near post.
With third-place Chelsea five points ahead and having played a game fewer than Everton, the Toffees are out of the title race but hoping to deny their fierce rivals a place in Europe's premier club competition.
But Liverpool, which has played 27 games to Everton's 28, could take fourth place on goal difference if it beats visiting West Ham in its extra game on Wednesday.
"Every win is important when you are fighting for fourth place," Liverpool manager Rafa Benitez said. "You need to put the other teams around you under pressure and we have done that today.
"As we have a game in hand, it depends on what we do. You do not need to see the table every day."
With another week to prepare for his team's Champions League match at Inter Milan, Benitez fielded a strong team against Bolton including Fernando Torres, Gerrard and Javier Mascherano.l Hadji Diouf almost put Bolton ahead in the fifth minute when he hit the post with a curling free kick from about 40 yards, but Liverpool took the lead seven minutes later.
Steven Gerrard shot weakly toward goal but his effort was heading wide until goalkeeper Jussi Jaaskelainen dived for it, causing the ball to flip back over his body and into the net.
Jaaskelainen then saved shots from Babel and Gerrard to keep his team in the game, but the visitors went ahead 2-0 in the 60th.
Liverpool forced a string of corners before Dirk Kuyt hit the post off a cross by Jamie Carragher. The ball rolled to Ryan Babel on the edge of the area and the Netherlands forward scored with a low shot.
Fabio Aurelio stretched his team's advantage 15 minutes later when he controlled the ball on his chest and volleyed past Jaaskelainen from the edge of the area.
Substitute Tamir Cohen, the son of former Liverpool player Avi Cohen, scored with a header to get a late goal back for Bolton, which has 25 points and is only above the relegation zone on goal difference.
Coming after last week's 3-2 win over Middlesbrough, Liverpool has now won back-to-back league games for the first time since beating Portsmouth and Derby in late December.
A run of draws and few wins has left Liverpool 15 points behind leader Arsenal, and 14 behind defending champion Manchester United.
"We are disappointed with where we are in the league," Gerrard said. "We need to keep together and keep fighting to the end.We have been inconsistent, so it's important to get the points."