The key to understanding this response by Jesus is to first start by considering the question he was asked: “Lord, are only a
few going to be saved?”
Next, note what he says after the portion you quoted: “… because I am telling you that
many will try to go in and will not be able.”
You probably are aware of this “few” “many” contrast in Scripture, e.g., “many are called but few are chosen.”
The other key word to notice in the question Jesus was asked is the word “saved.” As you read the remainder of Jesus’ response, you’ll understand that he is talking about being saved on Judgment Day.
Sadly, too many Christians don’t understand that the plan of salvation is a three-part process. The blueprint is as follows: when we are born again, we are saved by grace through faith (Ephesians 2:8), then we grow and mature as we are being saved in our walk of obedience (1 Corinthians 1:18; Philippians 2:12), and lastly, we, the faithful to the end who have done the good works of God, will be saved on Judgment Day (Ephesians 2:10; James 2:12-14; Hebrews 9:28).
I think you’ll find this video by Brother Kel very helpful concerning these matters.