Former Barcelona and Chelsea star Gudjohnsen was due to undergo a medical on Thursday after West Ham offered him a one-year deal.
The Icelander, who spent the second half of last season on loan at Fulham, is available on a free transfer after seeing out his contract at Stoke.
Swansea expressed an interest in signing the 32-year-old, but West Ham have beaten the Premier League new boys to the Iceland forward.
The move will see Gudjohnsen link up again with Sam Allardyce with the pair having worked together at Bolton.
Source: Team Talk
Source: Team Talk