Liverpool scored twice in the space of three second-half minutes to win the first leg of the Carabao Cup semi-final.
Willian put Fulham ahead at Anfield before goals from Curtis Jones and Cody Gakpo.
It means Liverpool will take a lead into the second leg at Craven Cottage, but the Whites still have a fighting chance of reaching Wembley.
Fulham frustrated the hosts during the first half and went ahead when Virgil van Dijk failed to deal with a ball into the box and Andreas Pereira teed up Willian, who showed great footwork to evade a couple of challenges and fire home.
Winning the away leg would have been a fantastic result for Fulham, who battled hard to protect their lead and were unlucky to concede an equaliser when Jones’ shot went in via a huge deflection off Tosin Adarabioyo.
And after good work by Diogo Jota on the left, Liverpool quickly netted again.
Jota found Darwin Nunez, who pulled the ball back for fellow substitute Gakpo to score with a first-time finish.
Liverpool continued to attack and three late saves by keeper Bernd Leno to deny Nunez could yet prove to be crucial.
Fulham: Leno, Castagne, Tosin, Diop, Robinson, Reed (Lukic 83), Palhinha, De Cordova-Reid, Pereira (Cairney 72), Willian (Wilson 72), Jimenez.
Subs not used: Rodak, Tete, Ream, Francois, Muniz, Vinicius.