Issa Diop's own goal and a Joelinton tap-in had put the hosts in a commanding position at the break.
But with the visitors seemingly on top, Newcastle had the final say, substitute Joe Willock heading an important winning goal that lifts Bruce's side up to 15th in the table, with a nine-point cushion to the bottom three.
He later said, "We were brilliant in the counter attack in the first half and we thought that would materialise more in the second half but the position we're in, we go deep in the second half and let West Ham dictate too much.
"After we adapted to them scoring, we changed it and were much better.
"We were arguably better against 11 than against ten. How often do you see it? The situation - human nature is to defend what you've got and go deep.
"We were wasteful and that gave West Ham the opportunity and to be fair to them they got themselves back in the game and made it one of those awful afternoons.
"To be fair we redeemed ourselves. Relieved.
"One of the things we talked about at half-time was 'Let's not go deep, let's get after them'."