What does Matthew 7:23 mean?
Jesus' words may sound harsh to us, but they also contain great truth. Great works will not earn a person entrance into the kingdom, even astounding good works like those listed (Matthew 7:21–22). Jesus has said that on "that day," when He comes to establish His kingdom, some will point to their good works of prophesying, casting out demons, and doing other powerful works in His name. Those people will claim that their performance has earned, or at least proven, a place in Christ's kingdom.To those people, Christ will simply say He never knew them, dismiss their supposedly great deeds as works of lawlessness, and command them to depart.
If performing such mighty works does not provide a way into His kingdom, what will? This is an example of how Scripture often presents statements requiring careful understanding. Jesus has said (Matthew 7:21) that only those who do the will of His Father will enter. However, the will of God for every person is to believe in Jesus, to receive the gift of the forgiveness of sin made possible by His death on the cross and to be declared righteous before God in that way (John 6:28–29). Those who refuse to believe in this way commit the sin of unbelief (John 16:9; Hebrews 3:12), eliminating the only way to be known by Christ and welcomed into His kingdom (John 3:36; Ephesians 2:8–9).
It's important to notice that Jesus is making an enormous claim in this verse about His role in the kingdom of heaven. He is the One who will declare whether someone can enter the kingdom of heaven. He is the Judge who will grant entrance or condemn those who have not placed their faith in Him alone. They will be separated from Himself and the Father.
This completes the second half of a two-part warning. Christians are not called to be naïve, either about others or themselves. Believers ought to be sensitive to spiritual deception from others (Matthew 7:15–20), as well as spiritual self-deception.