After four matches without a win in all competitions, the Gunners showed the steely resolve needed if they are to continue their title tilt.
Theo Walcott's brace and a strike from the returning Lukas Podolski saw the north Londoners recover from Carlton Cole's goal against the run of play to triumph 3-1.
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."