The court found Rita Maestre, 27, a Podemos councillor and former student of the far-left party's leader Pablo Iglesias, guilty of "infringing on freedom of conscience and religious convictions" for bursting into the chapel with some 50 others at Madrid's Complutense University.
The protesters said they were demonstrating against what they consider to be the Roman Catholic Church's "antidemocratic and chauvinistic" positions.
A left-wing coalition including Podemos has governed Madrid city hall since June 2015, after over two decades of rule by the conservative Popular Party which is in power at the national level.
Public prosecutors had asked for Maestre to be sentenced to a year in jail, the maximum penalty allowed under Spanish law for the crime.
Also Read
Maestre insisted during her court appearance last month that 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.