Gender separation in religious ritual in itself has little to do with the more general status of women in society, and in fact reflects more the society than vice-versa.

In some cases, it is simply to prevent social distractions during religious prayer. In the case of Islam, there is the additional factor of the particular way prayer are done, i.e. by prostrating oneself with one's bum in the air. Not many women would appreciate praying with their bum in a man's face...So there's actually a practical aspect, which is why there isn't a stronger movement to change that.

What is more concerning is that most often the section reserved for women is smaller, shabbier, and further from the center of the "action", making the women feel like a secondary afterthought. As usual, "separate but equal" means separate and unequal.