Ramsey has been a key figure in Arsenal’s surprise challenge for the Premier League title and the Wales international’s injury is a major blow to the Gunners’ hopes.
He limped off in the 65th minute at Upton Park to ruin his 23rd birthday.
Arsenal now face league matches against Newcastle and Cardiff and then an FA Cup tie with north London rivals Tottenham.
“It looks like a thigh strain,” Gunners manager Arsene Wenger 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.”
Theo Walcott’s brace and a strike from the returning Lukas Podolski saw Arsenal recover from Carlton Cole’s goal against the run of play to take the points in east London.