Everton looked set to ease in to the fourth round of the Capital One Cup after dominating the first half and they took a well-deserved lead through Steven Naismith.
Romelu Lukaku and the excellent Gerard Deulofeu kept Everton on top, but they could not find a second and Fulham made them pay as Martin Jol's men ran out 2-1 winners.
Jol's side had lost five and drawn one of their previous six home games, but Dimitar Berbatov levelled with his first of the season and Bent then wrapped the win up in front of England manager Roy Hodgson less than three minutes after his introduction from the bench.
The Fulham fans who chanted "Jol out" 10 days ago cheered the Dutchman and his men off after a welcome win for the west London club.
Roberto Martinez, on the other hand, will travel back up to Merseyside not knowing how his team failed to win after dominating the first half.
Lukaku, who joined Everton on loan from Chelsea last month, looked desperate to make an impression back in west London.
The Belgian, along with livewire Naismith and the skilful Deulofeu, ensured Everton dominated the opening stages.
Lukaku brushed off his marker and set up Naismith for an early chance, but his weak shot was saved.
David Stockdale saved from Naismith, but the midfielder made no mistake soon after.
Played onside by Scott Parker, Naismith latched on to a wonderful through ball from Deulofeu before driving the ball between David Stockdale's legs.
The response from Fulham was poor. Adel Taarabt hogged the ball and Berbatov was repeatedly caught offside.
The one time the Bulgarian did get his shot off, the ball rolled in to Joel Robles' arms.
Sylvain Distin hit a post as Everton continued to apply the pressure, and then the Deulofeu show began in earnest.
The Barcelona loanee beat three Fulham players inside the home box and only a desperate block from Brede Hangeland denied the winger a goal.
Deulofeu's trickery then earned him a yard and he found Naismith, but the midfielder could only drive in to the side-netting.
The bodies of Fulham defenders bounced off Lukaku as he strode towards goal but the strength of his shot did not match that of his run.
Deulofeu smacked a low drive just wide of Stockdale's goal just before the break.
Fulham responded well to being booed off at half-time.
Alex Kacaniklic went close with a stinging drive and Pajtim Kasami finally started coming in to the game.
When Fulham's equaliser came, there was a touch of fortune about it, however.
Seamus Coleman accidentally diverted Pasami's pass in to Berbatov's path when he tackled Taarabt and the Bulgarian tucked the ball away.
Everton looked rattled and Jol sought to take advantage by throwing Bent on.
Less than three minutes later, Bent scored Fulham's second in a move that Fulham had clearly practiced on the training ground before.
Giorgos Karagounis shaped up to shoot at goal from 30 yards, but instead he rolled the ball off to an unmarked Bent and he rifled the ball beyond Robles from a tight angle.
Deulofeu gave Philippe Senderos the slip and entered the box, but his shot flew just inches wide.
Fulham fans held their breath as Lukaku's low drive almost squirmed between Stockdale's legs.
Stockdale saved again with his legs from Coleman in a frenetic last few minutes, but Fulham clung on for a much-needed win.