Sunan Ibn Majah, Volume 2, Book 6, Hadith 1572 (DarusSalam) ⓘ
It was narrated that Abu Hurairah said: “The Prophet visited the grave of his mother and wept, causing the people around him to weep. Then he said: ‘I asked my Lord for permission to seek forgiveness for her, but He did not give me permission. Then I asked my Lord for permission to visit her grave and He gave me permission. So visit the graves, for they will remind you of death.’”
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا مُحَمَّدُ بْنُ عُبَيْدٍ، حَدَّثَنَا يَزِيدُ بْنُ كَيْسَانَ، عَنْ أَبِي حَازِمٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ زَارَ النَّبِيُّ ـ صلى الله عليه وسلم ـ قَبْرَ أُمِّهِ فَبَكَى وَأَبْكَى مَنْ حَوْلَهُ فَقَالَ " اسْتَأْذَنْتُ رَبِّي فِي أَنْ أَسْتَغْفِرَ لَهَا فَلَمْ يَأْذَنْ لِي وَاسْتَأْذَنْتُ رَبِّي فِي أَنْ أَزُورَ قَبْرَهَا فَأَذِنَ لِي فَزُورُوا الْقُبُورَ فَإِنَّهَا تُذَكِّرُكُمُ الْمَوْتَ " .
also referenced under: Hadith 1572 (Reference) & Book 6, Hadith 1639 (In-Book)