The lawsuit was filed by Avite, an association representing Spaniards born with severe defects after their mothers took the drug during their pregnancies.
The group is seeking compensation of 204 million euros ($276 million) from the company for its roughly 180 members.
Dozens of Spaniards born with defects caused by the drug, many in wheelchairs or on crutches, arrived at the court for the one-day trial carrying a sign reading simply "Justice".
The group said on its website that it hoped the "historic lawsuit (would) appease the suffering of Spanish victims, which began in their mothers' wombs and continues today, with the amputation of their arms and legs".
Thalidomide was originally marketed as a sedative, but from the late 1950s was prescribed to women around the world to combat morning sickness.
Many of the children of the mothers who took the drug were born with abnormally short limbs and in some cases without any arms, legs or hips. In late 1961 the drug was withdrawn from the British and German markets.
But it continued to be sold in other countries including Spain, Canada and Japan for several more months.
The drug is estimated to have caused deformities in 10,000-20,000 babies in some 40 countries.
Avite estimates that up to 3,000 babies may have been born with deformities in Spain because of the drug.
"If the verdict agrees with our complaint, the German firm Grunenthal will officially be considered for the first time in history as being responsible for what has happened," the association said on its website.
Grunenthal has refused to accept liability but last year it issued its first ever apology for the scandal, saying it was "very sorry" for its silence towards victims of the drug.
The company's lawyers rejected the compensation demand, arguing that the case had exceeded the statute of limitations.
"The events took place over 50 years ago, which leads us to believe that the legitimacy of any legal procedure could be seriously compromised given the time that has elapsed," the company said in a statement.
The company also said Spanish victims could seek aid through two German foundations and potentially "receive the same economic benefits" as German victims.
A ruling in the case is expected in three weeks.