Mormon notes that the people had lost spiritual gifts as a result of wickedness and unbelief. Yet, despite that state of apostasy, Mormon was able to be visited of the Lord know the Savior personally.
From this, we learn that even at times of apostasy or great moral decay, God continues to offer blessings to those who believe. Throughout eras of apostasy, there are still those who have spiritual experiences, visions, and revelations. We can see this in early Church history, with many visitations and dreams serving as a prelude to the restoration.
Sometimes we come to think that we have a monopoly of spiritual gifts. The reality is that those gifts are available to all who truly desire to follow the Lord.