In a desperate first half, Liverpool scored two unlucky goals against the backdrop of an inspired display from the hosts.
In the 19th minute, Ibrahima Konate sent a corner into his own goal.
Liverpool were unable to deal with Brentford’s set pieces, conceding twice more from corners in the first half, but both goals were ruled out for offside.
Minutes after Yoane Wiss’ second shot was disallowed, the Bees striker headed home after a sloppy Liverpool clearance.
A triple half-time substitution from a clearly frustrated Reds manager Jurgen Klopp, including the substitution of captain Virgil van Dijk, had the desired effect and Liverpool pulled one back through Alex Oxlade-Chamberlain five minutes after the restart.
At that stage it looked like the momentum was in Liverpool’s favour, but Brentford weathered the storm.
With six minutes remaining, Brian Mbeumo recorded a stunning finish, brushing aside Konate in pursuit of a long ball before slotting home.
Brentford are now on a six-game unbeaten run – their best run in the top flight for more than 80 years – and have climbed to seventh place.
Liverpool, who would be fourth on a point if they win, remain sixth and two points clear of the Bees.
The Bees are enjoying a special first win over the ragged Reds in 84 years
It was another special night for Brentford, with victory over Liverpool followed by emphatic victories over Manchester United and Arsenal in their return to the Premier League.
It was also their first win over Liverpool since 1938.
But for all their good work, Liverpool’s disorganized defensive play, littered with mistakes, was noticeable.
Konate missed the first goal, which hit his calf, but this corner came from Mbeumo, who made a clear run on the counter-attack, and goalkeeper Alisson had to come to the rescue.
All guests were overboard during the next two corners, luckily surviving both times.
They made one mistake many seconds later when Harvey Elliott lost the ball trying to hit a dummy in his own half, allowing Matias Jensen to set up Wiss.
Konate should also have been stronger in the final moments when Mbeumo knocked him off the ball before scoring a deserved third goal. It was a sad night for the Liverpool centre-back in his first appearance since reaching the World Cup final with France.
After winning games since the restart of the league, it was a disappointing setback for Klopp’s side.
They have now dropped 23 points this campaign – one more than they did all of last season.