Blues striker Stern John set the tone for the afternoon when he took advantage of a mistake by Gary Breen near the by-line in the fourth minute to put the visitors ahead with a strike that beat David James at his near post.
Joe Cole, easily West Ham's best player on the day, levelled on 17 minutes, clipping a deft left foot shot over keeper Nico Vaesen after receiving Paolo Di Canio's early pass on the left. It was a fine finish to a simple move that started with Tomas Repka's upfield punt from his own goalline.
But City regained the lead on the stroke of half-time. Former Hammer Stan Lazaridis, who gave Sebastien Schemmel a difficult time throughout, crossed from the left, and Stern had enough time and space to control the ball on his chest, swivel past Repka and prod the ball into the net from 10 yards.
The frustration of the home crowd, still awaiting their first win at Upton Park this season, increased as the game petered out into another disappointing defeat laced with too many defensive mistakes.
Apart from Cole, who backed up his creative play by working hard all over the pitch before being substituted due to a dead leg 15 minutes from the end, only Di Canio, Michael Carrick and Trevor Sinclair should have felt happy with their personal contribution on a day of few positives.
Jermain Defoe, given a full 90 minutes in the absence of the injured Fredi Kanoute, was restricted to just one first half shot that he screwed wide of the near post from the edge of the box, but he was completely shut out after the break.
In fact, the only other save Vaesen had to make as Hammers chased the game was a near-post shot from Sinclair that he deflected wide with his legs. But when he watches the TV replay, Sinclair will realise that he should have cut the ball square for Carrick, who would have had an easy tap-in from six yards.
Apart from shots from Di Canio and Steve Lomas, a volley that appeared to strike the arm of a City defender, that were both blocked for corners, Hammers never really looked like scoring a second equaliser, much less so when Cole made way for Titi Camara.
Fans were mystified by Cole's departure but Roeder explained afterwards that the England midfielder suffered a dead leg in the first half and was "lucky to even come out for the second half."
Ian Pearce also came on in the 73rd minute - for Schemmel - and may be due a recall but Roeder resisted the temptation to sacrifice one of his back four and switch to a back three instead. Camara was a willing runner but apart from lashing a left-footed effort well wide, he didn't seriously threaten Vaesen's goal.
But Hammers will find it hard to move off the bottom and up the table while they continue to concede soft goals that inspire their opponents to unexpected heights, while at the same time draining their own confidence. This is particularly true at home, where early mistakes breed hesitancy and spark displeasure among the fans.
Yet in the first half West Ham enjoyed a lot of good possession up until Birmingham's 18-yard box and, at the time of Cole's goal, were by far the better side going forward.
Roeder fully appreciated the fans' frustration, though, and admitted that his side played "as poorly in the second half as they have done this season" and never looked like claiming even a point after Birmingham went ahead for the second time.
4 - GOAL. An horrific start for the Hammers, as Breen misjudges Savage's hopeful punt towards the byline and allows John to slip in on his blindside and keep the ball in play. The Birmingham striker cuts across the six-yard line before firing a low shot past James to put his side ahead. West Ham United 0 Birmingham City 1.
8 - John again escapes from Breen to receive a pass 20 yards from goal before unleashing a fierce shot that appears goalbound before Minto gets across to superbly block the effort.
12 - Aliou Cisse booked for foul on Di Canio.
17 - GOAL! After recovering from that early shock, Hammers bounce back in style, as Di Canio collects the ball midway in the Birmingham half and releases the overlapping Cole, whose early touch creates a nice angle for the young midfielder to finish well with his left foot from 10 yards out. West Ham United 1 Birmingham City 1.
20 - Cole almost grabs a second, as a flowing move involving Carrick, Di Canio and Defoe ends with Joe firing in a shot from the edge of the box that is deflected wide for a corner.
21 - Hammers are now beginning to find the form we are more used to seeing at Upton Park, as Sinclair skips down the right and whips in a cross that is met at the near post by Di Canio, who heads the ball just wide of the target.
29 - Defoe, who has taken up some excellent positions without receiving the service he thrives on, creates a chance for himself when he collects possession on the right hand side and cuts inside two defenders before firing a low shot that fizzes just past the near post.
30 - After some intricate build-up play around the edge of the penalty area, the ball is pushed out wide to Di Canio, who twists brilliantly past Kenna before sending in a low cross that Cole is just inches away from connecting with before Vaesen clears for Birmingham.
27 - Morrison's measured pass finds Lazaridis on the left hand side of the penalty area and the Australian winger finds a yard of space before firing in a left-foot shot that whistles just past the post.
44 - GOAL. Disaster for the Hammers on the stroke of half-time as John grabs his second to restore Birmingham's lead. Lazaridis' left-wing cross finds the striker unmarked in the penalty area and he controls the ball on his chest, turning away from goal with the danger seemingly over. However, with a clever 'Cruyff turn', John completely wrongfoots Repka and stabs the ball past James from 12 yards out.
Added time: 1 minute.
Half-time: West Ham United 1 Birmingham City 2.
47 - Birmingham almost extend their lead, as John is given too much time on the ball in the penalty area and backheels for Morrison, who somehow scoops his shot over the bar from just six yards out.
50 - Minto booked fo foul on Devlin.
53 - Di Canio attempts another goal of the season effort, as Cole scoops up a free-kick some 30 yards out for the Italian to volley. Sadly, the effort flies high and wide.
54 - Cole controls a cross in the area and has his ankles clipped as he jinks past a defender. However, the young midfielder battles to keep his balance, leaving referee Dowd with no choice but to wave play on and the ball is cleared.
59 - Hammers waste a glorious opportunity to get back on level terms, as Di Canio's trickery releases Sinclair on the right hand side of the area but, rather than simply square the ball to give Carrick an open goal, the winger shoots from an acute angle and Vaesen manages to divert the effort round the post for a corner.
60 - From the resulting kick, the ball drops kindly for Repka, but the defender screws his low shot into the side-netting from 10 yards out.
65 - Cole combines well on the right with Lomas, who cuts the ball back for Di Canio but Savage flings himself in the way of the Italian's shot to concede a corner.
68 - Cole's crossfield pass is nodded down by Sinclair for Lomas, whose stinging volley looks destined for the net before catching Purse full in the face and flying off for a corner.
73 - Double substitution for West Ham, Camara replaces Cole and Pearce replaces Schemmel.
74 - Defoe flicks back a long pass for Camara, who volleys just over the bar with his first touch since entering the field of play.
83 - Substitution for Birmingham City, Horsfield replaces John.
84 - Substitution for Birmingham City, Powell replaces Lazaridis.
Added time: 3 minutes.
90 - Carrick booked for unsporting behaviour.
Full-time: West Ham United 1 Birmingham City 2.