كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ
5  
The Book of Mosques and Places of Prayer
(44)
Chapter: Prayer in congregation is one of the sunnah of guidance
(44)
باب صَلاَةُ الْجَمَاعَةِ مِنْ سُنَنِ الْهُدَى ‏
Sahih Muslim 654 b

Abdullah (b. Mas'ud) reported:

He who likes to meet Allah tomorrow as Muslim, he should persevere in observing these prayers, when a call is announced for them, for Allah has laid down for your Prophet the paths of right guidance, and these (prayers) are among the paths of right guidance. If you were to pray in your houses as this man why stays away (from the mosque) prays in his house, you would abandon the practice of your Prophet, and if you were to abandon the practice of your Prophet, you would go astray. No man purifies himself, doing it well, then makes for one of those mosques without Allah recording a blessing for him for every step he takes raising him a degree for it, and effacing a sin from him for it. I have seen the time when no one stayed away from it, except a hypocrite, who was well known for his hypocrisy, whereas a man would be brought swaying (due to weakness) between two men till he was set up in a row.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا الْفَضْلُ بْنُ دُكَيْنٍ، عَنْ أَبِي الْعُمَيْسِ، عَنْ عَلِيِّ بْنِ الأَقْمَرِ، عَنْ أَبِي الأَحْوَصِ، عَنْ عَبْدِ اللَّهِ، قَالَ مَنْ سَرَّهُ أَنْ يَلْقَى اللَّهَ غَدًا مُسْلِمًا فَلْيُحَافِظْ عَلَى هَؤُلاَءِ الصَّلَوَاتِ حَيْثُ يُنَادَى بِهِنَّ فَإِنَّ اللَّهَ شَرَعَ لِنَبِيِّكُمْ صلى الله عليه وسلم سُنَنَ الْهُدَى وَإِنَّهُنَّ مِنْ سُنَنِ الْهُدَى وَلَوْ أَنَّكُمْ صَلَّيْتُمْ فِي بُيُوتِكُمْ كَمَا يُصَلِّي هَذَا الْمُتَخَلِّفُ فِي بَيْتِهِ لَتَرَكْتُمْ سُنَّةَ نَبِيِّكُمْ وَلَوْ تَرَكْتُمْ سُنَّةَ نَبِيِّكُمْ لَضَلَلْتُمْ وَمَا مِنْ رَجُلٍ يَتَطَهَّرُ فَيُحْسِنُ الطُّهُورَ ثُمَّ يَعْمِدُ إِلَى مَسْجِدٍ مِنْ هَذِهِ الْمَسَاجِدِ إِلاَّ كَتَبَ اللَّهُ لَهُ بِكُلِّ خَطْوَةٍ يَخْطُوهَا حَسَنَةً وَيَرْفَعُهُ بِهَا دَرَجَةً وَيَحُطُّ عَنْهُ بِهَا سَيِّئَةً وَلَقَدْ رَأَيْتُنَا وَمَا يَتَخَلَّفُ عَنْهَا إِلاَّ مُنَافِقٌ مَعْلُومُ النِّفَاقِ وَلَقَدْ كَانَ الرَّجُلُ يُؤْتَى بِهِ يُهَادَى بَيْنَ الرَّجُلَيْنِ حَتَّى يُقَامَ فِي الصَّفِّ ‏.‏
Reference : Sahih Muslim 654b
In-book reference : Book 5, Hadith 321
USC-MSA web (English) reference : Book 4, Hadith 1376
  (deprecated numbering scheme)