كتاب الصلاة
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 h

Ibn Umar reported:

The Messenger of Allah (ﷺ) said: Do not deprive women of their share of the mosques, when they seek permission from you. Bilal said: By Allah, we would certainly prevent them. 'Abdullah said: I say that the Messenger of Allah (ﷺ) said it and you say: We would certainly prevent them!
حَدَّثَنَا هَارُونُ بْنُ عَبْدِ اللَّهِ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يَزِيدَ الْمُقْرِئُ، حَدَّثَنَا سَعِيدٌ، - يَعْنِي ابْنَ أَبِي أَيُّوبَ - حَدَّثَنَا كَعْبُ بْنُ عَلْقَمَةَ، عَنْ بِلاَلِ بْنِ عَبْدِ اللَّهِ بْنِ عُمَرَ، عَنْ أَبِيهِ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ لاَ تَمْنَعُوا النِّسَاءَ حُظُوظَهُنَّ مِنَ الْمَسَاجِدِ إِذَا اسْتَأْذَنُوكُمْ ‏"‏ فَقَالَ بِلاَلٌ وَاللَّهِ لَنَمْنَعُهُنَّ ‏.‏ فَقَالَ لَهُ عَبْدُ اللَّهِ أَقُولُ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم وَتَقُولُ أَنْتَ لَنَمْنَعُهُنَّ ‏.‏
Reference : Sahih Muslim 442h
In-book reference : Book 4, Hadith 157
USC-MSA web (English) reference : Book 4, Hadith 891
  (deprecated numbering scheme)