Muwatta Malik, Book 14, Hadith 15 (USC-MSA)

Yahya related to me from Malik from Yahya ibn Said from Amra bint Abd ar-Rahman that A'isha, the wife of the Prophet, may Allah bless him and grant him peace, said, "If the Messenger of Allah, may Allah bless him and grant him peace, had seen what women do now, he would have forbidden them to go into the mosques, just as the women of the Bani Israil were forbidden." Yahya ibn Said said that he asked Amra, "Were the women of the Bani Israil forbidden to go into the mosques?" and she said, "Yes."

وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ يَحْيَى بْنِ سَعِيدٍ، عَنْ عَمْرَةَ بِنْتِ عَبْدِ الرَّحْمَنِ، عَنْ عَائِشَةَ، زَوْجِ النَّبِيِّ صلى الله عليه وسلم أَنَّهَا قَالَتْ لَوْ أَدْرَكَ رَسُولُ اللَّهِ صلى الله عليه وسلم مَا أَحْدَثَ النِّسَاءُ لَمَنَعَهُنَّ الْمَسَاجِدَ كَمَا مُنِعَهُ نِسَاءُ بَنِي إِسْرَائِيلَ ‏.‏ قَالَ يَحْيَى بْنُ سَعِيدٍ فَقُلْتُ لِعَمْرَةَ أَوَمُنِعَ نِسَاءُ بَنِي إِسْرَائِيلَ الْمَسَاجِدَ قَالَتْ نَعَمْ ‏.‏

sunnah.com

also referenced under: Book 14, Hadith 472 (In-Book)