Scrum-half Gomarsall, capped 23 times, has been without a club since leaving Worcester earlier this year.
"Andy is a very experienced player in a key position within the team," said Quins rugby director Dean Richards.
"He will have a big part to play in our Premiership campaign and will further enhance the competition of places within the squad."
Gomarsall, 32, scored two tries during England's pool victory over Uruguay during the 2003 World Cup campaign, although he did not feature in the final against Australia.
His last Test match appearance came almost two years ago when Australia visited Twickenham.
Gomarsall will join Quins next week and he could make his debut against EDF Energy Cup opponents Llanelli Scarlets on Sunday week.
Quins though, are currently finding life tough in the Guinness Premiership.
Since regaining top-flight status after winning the National League One title last term, Quins have suffered successive defeats against London Irish, Gloucester and Wasps ahead of Saturday's home appointment with Leicester.