Rovers went into the game off the back of three defeats in row, but they were full value for their victory against the Hammers.
Terry McPhillips side impressed in the first half, enjoying the majority of possession, pressure and winning a host of corner kicks but they couldn't turn that advantage into goalmouth chances.
The second half was more of an even contest but it was Rovers who grabbed the vital goal on 66 minutes.
Good work down the left side of midfield was followed by a deep cross from Will Beesley to the back post and Danny Laverty arrived perfectly to fire home from close-range for his first goal of the season.
Both sides pressed, West Ham looking for a way back into the game, whilst Rovers were keen to extend their lead further, but on a day when chances were few and far between it was McPhillips' side saw the game out to claim all three points.
"In the first half we played some lovely stuff, we had plenty of corners and lots of pressure but we just couldn't score a goal," said McPhillips.
"The second half was a more even game but we scored a very good goal and I think on the whole we deserved the win for what was a good team performance.
"It was a good trip for us, we travelled down on Friday morning and trained at Thurrock that afternoon, so we might look to do the same again when we play Arsenal at the end of the month."
ROVERS: Raya, Daly (sub Rittenberg 72 mins), Butterwick, Thompson, Beesley (sub Humphreys 72 mins), Brown, Boland, Wassi, Haley (sub Pero 80 mins), Laverty, Mason.
Subs not used: Preston, Harris.