Contrary to popular belief, just "believing" in Jesus doesn't save you.
Read Matthew 7:22-23.
Matthew 7:22-23 (Amplified Bible)
22)Many will say to Me on that day, Lord, Lord, have we not prophesied in Your name and driven out demons in Your name and done many mighty works in Your name?
23)And then I will say to them openly (publicly), I never knew you; depart from Me, you who act wickedly [disregarding My commands].
Jesus tells them "I never knew you." These people thought they were ministers of God--Prophets and/or miracle workers. They thought they were doing Gods work, but they weren't even saved.
How do I know they weren't saved?
2 Timothy 2:19 (Amplified Bible)
19) But the firm foundation of (laid by) God stands, sure and unshaken, bearing this seal (inscription): The Lord knows those who are His, and, Let everyone who names [himself by] the name of the Lord give up all iniquity and stand aloof from it.
Notice that this scripture says "The Lord knows those who are His." If Jesus said He never knew them, then these people had not done what was needed to be saved. And if they weren't saved, then they couldn't have the Holy Spirit (Romans 8:9) to be able to work their so called miracles, or to prophesy, or to cast out demons.
If all you had to do to be saved was just "believe" then these people Jesus speaks of in Matthew 7:22-23 would certainly have been saved. Just by hearing their remarks to Jesus you can tell that they obviously believed in Him.
Blessings,
Alan