After four matches without a win in all competitions, the Gunners showed the steely resolve needed if they are to continue their title tilt.
It was the ideal start to a run of three league matches in six days and then an FA Cup tie with rivals Tottenham, but one tarnished to an extent by an injury to Ramsey.
The Wales international, who turned 23 on Boxing Day, was forced off in the 65th minute through what manager Arsene Wenger confirmed is a thigh injury.
"It looks like a thigh strain," the Frenchman said.
"For me, I don't know how serious the thigh strain is but the Christmas period is certainly over for him. It was his birthday today.
"I don't know how long it will be. We will have to see tomorrow morning. He knew straight away, but we have to see."
West Ham also saw a key player limp off after James Collins complained of a tight calf, but at least three points helped soften Wenger's own injury blow.
"I was delighted," he said.
"Overall, I feel we controlled the game but felt we had a difficult period where the game could have changed.
"That was in the first 10 minutes of the second half when West Ham scored and they had a header from a cross, which could have been 2-0.
"That was certainly the turning point of that game and after that we had plenty of chances.
"We couldn't take our chances in the first half and we responded very well in second half, in the end winning the game in a convincing way.
"I have confidence in my team - I have confidence but I also worry. That is the nature of the game, you always worry.
"I am proud of the character of this team because they are always focused and try to do well. They responded, but football is football."
Things could have been much different for Wenger's side had West Ham managed to capitalise on their fine start to the second period.
After Cole pounced on a Wojciech Szczesny mistake, the Hammers wasted three decent chances to double their advantage and potentially put the game out of sight.
Those missed chances allowed Arsenal to come back, condemning Sam Allardyce's side to a defeat that sees them slip into the relegation zone.
The West Ham manager said: "We've let it slip through our fingers, haven't we?
"We had three golden chances after we scored - Matt Jarvis in the box, one-on-one, Joey O'Brien's free header in the six-yard box and Carlton Cole's side-foot tap.
"We paid the price because what Arsenal do then is take more and more chances when they are losing.
"It was either going to be us getting that second goal and then we would have made sure we tightened it up or they'd score.
"I think the quality they have got, they said, 'alright lads, you're going to have to continue to defend without much support from us because we have gone done a goal down'.
"We had a great opportunity to win against the top of the league team and unfortunately we didn't take it because we didn't get the second. We paid the price today, sadly."
West Ham will hope to make amends when West Brom visit on Saturday lunchtime, although Collins' calf complaint compounds an already lengthy injury list.
"Ravel Morrison reported a groin (injury) on Christmas Eve and James we won't know how bad it is until tomorrow," Allardyce added.
"Then you have your Winston Reids, Stewart Downings, Richard Vaz Tes and Andy Carrolls that are progressing but are still a little way away at the moment."
- Sports & Recreation
- Carlton Cole
- Arsene Wenger