The Statement of Allah the Exalted: "...O you who believe! Enter not the Prophet's houses, except when leave is given to you for a meal... (up to) ... Verily! With Allah that shall be an enormity." (V.33:53) Sahih al-Bukhari 4792
Arabic hadith text
حَدَّثَنَا سُلَيْمَانُ بْنُ حَرْبٍ، حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، عَنْ أَيُّوبَ، عَنْ أَبِي قِلاَبَةَ، قَالَ أَنَسُ بْنُ مَالِكٍ أَنَا أَعْلَمُ النَّاسِ، بِهَذِهِ الآيَةِ آيَةِ الْحِجَابِ، لَمَّا أُهْدِيَتْ زَيْنَبُ بِنْتُ جَحْشٍ رَضِيَ اللَّهُ عَنْهَا إِلَى رَسُولِ اللَّهِ صلى الله عليه وسلم كَانَتْ مَعَهُ فِي الْبَيْتِ، صَنَعَ طَعَامًا، وَدَعَا الْقَوْمَ، فَقَعَدُوا يَتَحَدَّثُونَ،فَجَعَلَ النَّبِيُّ صلى الله عليه وسلم يَخْرُجُ، ثُمَّ يَرْجِعُ، وَهُمْ قُعُودٌ يَتَحَدَّثُونَ، فَأَنْزَلَ اللَّهُ تَعَالَى {يَا أَيُّهَا الَّذِينَ آمَنُوا لاَ تَدْخُلُوا بُيُوتَ النَّبِيِّ إِلاَّ أَنْ يُؤْذَنَ لَكُمْ إِلَى طَعَامٍ غَيْرَ نَاظِرِينَ إِنَاهُ} إِلَى قَوْلِهِ {مِنْ وَرَاءِ حِجَابٍ} فَضُرِبَ الْحِجَابُ، وَقَامَ الْقَوْمُ.
Translation
Narrated Anas bin Malik
I of all the people know best this verse of Al-Hijab. When Allah's Messenger (ﷺ) married Zainab bint Jahsh she was with him in the house and he prepared a meal and invited the people (to it). They sat down (after finishing their meal) and started chatting. So the Prophet (ﷺ) went out and then returned several times while they were still sitting and talking. So Allah revealed the Verse: 'O you who believe! Enter not the Prophet's houses until leave is given to you for a meal, (and then) not (so early as) to wait for its preparation .....ask them from behind a screen.' (33.53) So the screen was set up and the people went away.