The game came the day after Bamford was left out of Gareth Southgate’s squad for the first World Cup qualifiers.
Fulham, meanwhile, missed the chance to move out of the Premier League relegation zone with a third defeat in four games.
Leeds had two goals disallowed in the first half – first when Luke Ayling’s header was ruled out by the video assistant referee and then when Raphinha was well offside before slotting home.
They led when Bamford smashed home at the near post from Jack Harrison’s cross.
Fulham were level when defender Joachim Andersen volleyed in from Ademola Lookman’s corner, his first goal in English football.
But Leeds scored the winner just before the hour mark, as Bamford fed Raphinha, who beat two defenders before poking home.
I just need to keep working and see if I can get my name in contention for the Euros, Bamford told Sky Sports. If I keep going as I am I think I’m in with a shot. If you told me at the start of the season I’d be linked with England, I’d say you were bonkers.
If it comes, it comes. If not, I’ll know I’ve done my best. It was in the back of my mind a little bit I guess. It gives you a bit of an extra fire in your belly.
The result takes Marcelo Bielsa’s Leeds up to 11th in the table on 39 points.