The handcuffed defendants, many of whom were crying, arrived at a Cairo court with their heads bowed as police pushed them inside a metal cage, an AFP correspondent reported.
"I am innocent. I was in the hammam for therapy, I swear in the name of Allah," said a defendant as he wept inside the cage.
"The police beat us every day and force us to sleep on our stomachs," said another.
The men were arrested on December 7 in a night-time police raid on a hammam in the Azbakeya district of central Cairo.
The nearly naked men were loaded into police trucks in the middle of the night. An Egyptian television presenter filmed the raid and aired it days later.
The families of the defendants were banned by the judge from attending Sunday's session.
Angry relatives stopped photographers from taking pictures outside the court, while some mothers cried and screamed.
"Don't defame our sons, they are real men," shouted one of the mothers.
Signup to our newsletter and follow us on Facebook and Twitter!
A brother of one defendant insisted to AFP that he was innocent.
"This is about our honour. This will destroy our entire family," he said, accusing television presenter Mona Iraqi of fabricating the case.
"It's all because of a journalist who seeks fame," he said.
The court postponed the trial to January 4.
The raid on the bathhouse is the latest in a crackdown by police on gays, and came two months after a court sentenced eight men for three years over a video which prosecutors said was of a gay wedding.
Television presenter Iraqi is said to have reported the Cairo hammam to police after uncovering the activities while researching a programme on AIDS and prostitution in Egypt.
"This bathhouse has been operating for a hundred years," said defence lawyer Mohamed Zakaria Al-Tobgy.
"The defendants were filmed on camera with their towels on, which is how one is inside a bathhouse."
Advocacy groups such as New York-based Human Rights Watch have condemned prosecutions of homosexuals in Egypt.
Egyptian law does not expressly ban homosexuality but gay men have previously been arrested and charged with debauchery instead.