كتاب الصلاة
4  
The Book of Prayers
(30)
Chapter: Women Going Out To The Masjid So Long As No Fitnah Results From That; and They Should Not Go Out Wearing Perfume
(30)
باب خُرُوجِ النِّسَاءِ إِلَى الْمَسَاجِدِ إِذَا لَمْ يَتَرَتَّبْ عَلَيْهِ فِتْنَةٌ وَأَنَّهَا لاَ تَخْرُجُ مُطَيَّبَةً
Sahih Muslim 442 b

Abdullah b. Umar reported:

I heard Allah's Messenger (ﷺ) say: Don't prevent your women from going to the mosque when they seek your permission. Bilal b. 'Abdullah said: By Allah, we shall certainly prevent them. On this'Abdullah b. Umar turned towards him and reprimanded him to harshly as I had never heard him do before. He ('Abdullah b. Umar) said: I am narrating to you that which comes from the Messenger of Allah (ﷺ) and you (have the audicity) to say: By Allah, we shall certainly prevent them.
حَدَّثَنِي حَرْمَلَةُ بْنُ يَحْيَى، أَخْبَرَنَا ابْنُ وَهْبٍ، أَخْبَرَنِي يُونُسُ، عَنِ ابْنِ شِهَابٍ، قَالَ أَخْبَرَنِي سَالِمُ بْنُ عَبْدِ اللَّهِ، أَنَّ عَبْدَ اللَّهِ بْنَ عُمَرَ، قَالَ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ ‏ "‏ لاَ تَمْنَعُوا نِسَاءَكُمُ الْمَسَاجِدَ إِذَا اسْتَأْذَنَّكُمْ إِلَيْهَا ‏"‏ ‏.‏ قَالَ فَقَالَ بِلاَلُ بْنُ عَبْدِ اللَّهِ وَاللَّهِ لَنَمْنَعُهُنَّ ‏.‏ قَالَ فَأَقْبَلَ عَلَيْهِ عَبْدُ اللَّهِ فَسَبَّهُ سَبًّا سَيِّئًا مَا سَمِعْتُهُ سَبَّهُ مِثْلَهُ قَطُّ وَقَالَ أُخْبِرُكَ عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم وَتَقُولُ وَاللَّهِ لَنَمْنَعُهُنَّ ‏.‏
Reference : Sahih Muslim 442b
In-book reference : Book 4, Hadith 151
USC-MSA web (English) reference : Book 4, Hadith 885
  (deprecated numbering scheme)