The result means the Magpies finish 15th in the table and Hull, who drew 0-0 with Manchester United, join Burnley and QPR in the Championship.
On a tense and nervy afternoon, the deadlock was broken in the 54th minute when Moussa Sissoko headed home Gutierrez’s cross.
Gutierrez, playing perhaps his final game for the club after recovering from testicular cancer, then scored his first goal for over two years to ensure the Magpies avoided relegation.
The goal sparked wild celebrations from Gutierrez, his team-mates and Carver and more followed at the final whistle as Newcastle ended a traumatic season on a postive note.
While it was joy for Newcastle and John Carver, West Ham announced immediately after the match that Sam Allardyce’s contract will not be renewed.
The former Newcastle boss took charge of the Hammers in 2011 and led them to a 12th-place finish in the league this season.
But he was unable to end with a win as Newcastle got the three points that ensured they did not have to rely on the result at the KC Stadium to avoid the drop.
Roared on by a full house at St James’ Park, Newcastle started on the front foot as Emmanuel Riviere dragged a shot across goal in the first minute and then missed the target with an acrobatic scissor kick from Daryl Janmaat’s cross.
Janmaat then fired wide just as Hull had a couple of goals disallowed against Man United for offside.
But the Hammers grew into the half and created the best opening in the 23rd minute when Aaron Cresswell’s cross played Stewart Downing in behind the Newcastle defence, but Tim Krul blocked well with his legs.
Janmaat headed over the bar at the other end as Newcastle continued to lack composure in front of goal.
That continued early in the second half when Riviere failed to make contact with Janmaat’s cross when he should have swept the ball home.
However, Newcastle did get the vital breakthrough shortly afterwards as Gutierrez crossed from the left and Sissoko got up between two defenders to head past Adrian.
The goal seemed to settle some of the nerves and the Hammers were unable to muster a reply.
Former Newcastle midfielder Kevin Nolan had the best chance for the visitors when he fired wide of goal from inside the area.
The game remained finally balanced heading into the closing stages with Vurnon Anita passing up a glorious opportunity to kill it off when he broke from his own half along with Sissoko, Papiss Cisse and Colback and not a claret and blue shirt in sight, but somehow managed to serve the ball up to Adrian.
But Gutierrez had the final say with five minutes remaining when he smashed a skidding shot past the keeper with the help of a deflection to end the quest for survival in style.
Newcastle: Krul (6), Coloccini (7), Dummett (7), Janmaat (7), Williamson (6), Anita (6), Colback (7), Gutierrez (8), Riviere (6), Sissoko (7), Cisse (6).
Subs: Gouffran (5).
West Ham: Adrian (5), Burke (6), Cresswell (6), Jenkinson (6), Reid (6), Downing (6), Kouyate (5), Nolan (5), Song (6), Valencia (5), Cole (5).
Subs: Tomkins (5), Amalfitano (5), Lee (5).
Man of the match: Jonas Gutierrez.