كتاب الجهاد والسير
32  
The Book of Jihad and Expeditions
(39)
Chapter: The persecution suffered by the prophet (saws) at the hands of the idolaters and hypocrites
(39)
باب مَا لَقِيَ النَّبِيُّ صلى الله عليه وسلم مِنْ أَذَى الْمُشْرِكِينَ وَالْمُنَافِقِينَ ‏‏
Sahih Muslim 1797 a

It has been narrated on the authority of Aswad b. Qais who heard Jundub saying that Gabriel delayed his visit to the Messenger of Allah (ﷺ) The polytheists began to say that Muhammad has been forsaken. At this Allah, the Glorious and Exalted, revealed:

" Wa'dd hd wa'l-laili iza saja, ma wadda'ka Rabbuka wa' ma qala" [By the glorious morning light, and by the night when it is still: thy Lord has not forsaken thee, nor is He displeased].
حَدَّثَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ، أَخْبَرَنَا سُفْيَانُ، عَنِ الأَسْوَدِ بْنِ قَيْسٍ، أَنَّهُ سَمِعَ جُنْدُبًا، يَقُولُ أَبْطَأَ جِبْرِيلُ عَلَى رَسُولِ اللَّهِ صلى الله عليه وسلم فَقَالَ الْمُشْرِكُونَ قَدْ وُدِّعَ مُحَمَّدٌ فَأَنْزَلَ اللَّهُ عَزَّ وَجَلَّ ‏{‏ وَالضُّحَى * وَاللَّيْلِ إِذَا سَجَى * مَا وَدَّعَكَ رَبُّكَ وَمَا قَلَى‏}
Reference : Sahih Muslim 1797a
In-book reference : Book 32, Hadith 138
USC-MSA web (English) reference : Book 19, Hadith 4428
  (deprecated numbering scheme)