Rita Maestre, a 27-year-old Podemos councillor and former student of the far-left party's leader Pablo Iglesias, has been charged with "infringing on freedom of conscience and religious convictions" for bursting into the chapel with some 50 others in 2011 at Madrid's Complutense University.
The protest had sparked an outcry, leading to protests from right-wing politicians and the Church.
"I didn't get undressed, I took off my t-shirt," Maestre told the court in Madrid.
"A bare chest need not be offensive," added the spokeswoman, who is part of the left-wing team leading Madrid since June last year.
A witness praying in the chapel at the time said the protesters had shouted slogans such as "Against the Vatican, clitoris power" or "We will burn you like in 36", in reference to violence against Catholics during the 1936-9 civil war.
Hector Meleiro Suarez, an activist also on trial who took part in the protest, said the aim was to defend "the secularity of public institutions."
Maestre, who has previously said the protest was also aimed at defending women's rights, insisted it was a peaceful, legitimate demonstration.
"If it offended someone, I have no problems in apologising," she said, adding she had already said sorry to the archbishop of Madrid.
She faces a year in prison.
Iglesias, who was politics professor at the university at the time, pledged his support for Maestre on Twitter.
"You were one of my best students... and you are still an example," he said in a video message.