Kevin Nolan scored the only goal to move West Ham up to second in the Championship table and extend Brighton's winless run to seven games.
Gus Poyet's Brighton had much of the play at the Amex Stadium.
But Nolan took advantage of Liam Bridcutt's error to score from distance to put the visitors ahead.
The Seagulls, who saw Gary Dicker leave the pitch with an ankle injury in the second half, pushed for an equaliser but could not find a way through.
Sam Allardyce's team are now three points adrift of leaders Southampton, leaving Brighton with three points from a possible 21.
Nolan took only 16 minutes to deprive former Newcastle team-mate Steve Harper, who joined Brighton on a one-month loan deal on Monday, of a clean sheet.
The West Ham captain robbed Bridcutt in midfield and beat Harper with a curling effort from 25 yards to give the visitors the lead with his fourth goal of the season.
But other than a Nolan header that flew over the bar, Brighton were dominant for the rest of the opening period, with Craig Noone going close from distance and Craig Mackail-Smith forcing a smart save from Manuel Almunia.
The pressure continued after half-time without Almunia being tested, while John Carew's powerful shot on the turn was denied by Harper at the other end.
Almunia also had to be alert and brave to beat Mackail-Smith to Dicker's throughball.
Dicker left the field on a stretcher in the closing stages after receiving treatment for about five minutes for his injury.
Will Hoskins lifted a shot over the bar from just outside the area as Brighton desperately chased an equaliser.
But the Hammers came through eight minutes of injury time to hold on for a fourth away win, and fourth clean sheet, in seven away matches this season.
Brighton manager Gus Poyet:
"It was one mistake. We played the kind of football that if you make a mistake it will be expensive.
"But I'm proud and Brighton is back to its best, playing against a Premiership team and not letting them touch the ball for I don't know how long.
"It was one-way traffic. The whole game was the same, someone wants to play and go forward and someone wants to defend but unfortunately it didn't work with the result. Gary Dicker has an ankle problem but we will know more tomorrow."
West Ham manager Sam Allardyce:
"It was a disappointment to lose at Southampton, with them moving five points clear, but now we're back into second spot.
"Brighton made it hugely difficult but our defensive resilience, not just from the back four, was outstanding and it's a fantastic three points.
"Our defensive play was so good that it's hard to think of what chances Brighton had. They didn't have the chances to go with their possession."