The Hammers lost at home for the fifth time in a row in the premier league.
Ivan Toney scored his 12th league goal of the season and Josh Da Silva made it 2-0.
The Hammers were booed by the crowd at London Stadium, which kept them in the bottom half of the table.
Toney was taken off on a stretcher with a knee injury.
The Bees moved up to ninth in the league with the victory.
West Ham have lost five games in a row for the first time under Slaven Bilic.
Five-and-a-half years later, West Ham have enjoyed many highs under the management of David Moyes, however this defeat puts his role under serious question.
The manner in which the goals were conceded is not the only reason for the defeat.
The first two goals came from West Ham failing to properly defend throw-ins, and both came after periods in the game when they had enjoyed good attacking spells.
The opener came in the 18th minute, when a long throw by Mathias Jensen was tipped on by another. After Christian Norgaard hit his volley, Toney followed up and stabbed home.
The second was worse than the first. The ball was thrown over the top of the sleeping home defence by Toney.
Da Silva scored his first goal of the year when he outmuscled and outpaced his opponent.
The teams will meet again in January. It remains to be seen if he remains in that position.
The previous club record for consecutive games without defeat was set by West ham. The last time the Bees had a longer top-flight run was in 1939.
If West Ham had taken their chances, things could have been different.
The 2-2 draw against Spurs on Boxing Day will leave Thomas Frank satisfied with how his side have recovered from the World Cup.
Should Toney be ruled out by a long-term injury, what will be done?
The forward, tipped by many for a place in England's World Cup squad, jarred his knee in the turf after an innocuous challenge for a late corner.
Toney banged the turf before being carried from the field on a stretcher.
If FA charges of breaching betting rules are proven, Toney will face a ban. He has until January 4 to reply to the allegations.
On the field, Toney remains one of the Premier League's deadliest strikers. He scored his 12th league goal of the season here, the same as his 2021-22 total , and hHe ends the calendar year of 2022 with 20 Premier League goals - only Harry Kane, with 26, has scored more.
Toney crossed his arms in front of the London Stadium crowd to celebrate his goal.
They have won all three of their meetings against West ham.