Satan has really distorted the teaching regarding this issue of grace vs. works and that because anyone who trusts in their own efforts will not inherit the kingdom of God, which is why this controversy exists. Jesus gave us an example of those who trust in their own efforts:
"Not everyone who says to me, ‘Lord, Lord,’ will enter the kingdom of heaven, but only the one who does the will of my Father who is in heaven. Many will say to me on that day, ‘Lord, Lord, did we not prophesy in your name and in your name drive out demons and in your name perform many miracles?’ Then I will tell them plainly, ‘I never knew you. Away from me, you evildoers!’ "
In the example above, those people find out that they are not entering into the kingdom of God. Their own response of "did we not" gives them away as to why they are not entering in and that by citing their own works, "did we not prophesy in your name, drive out demons and do many miracles?". Jesus says not everyone will enter in except he who does the will of my Father. The will of the Father is for us to believe in his Son, which by their response they weren't doing. We have to look to the father of faith as an example of how he was credited with righteousness. Notice the word "credited," which would infer "not earned."
We have to go back to the example of the father of faith, which was that Abraham believed God and that belief alone in God's promise is how Abraham was credited with righteousness. Should we do works, definitely! And we should be zealous for them, but not to obtain nor maintain salvation, but to glorify God. And by our good works we will also receive reward from the Lord at his appearing. But anyone who is counting on works as an aid to salvation are not trusting in Christ, but their own efforts.
When Peter was preaching the good news to Cornelius' household, while he was still speaking, they all received the Holy Spirit and all began speaking in languages and prophesying. This happened before they were baptized, without being circumcised, without being under the law or promising to obey the law, without performing any kind of works or the promise thereof to do so. So how were they saved, Because God purified their hearts by faith and by their faith alone.
"You are worthy to take the scroll and to open its seals, because you were slain, and with your blood you purchased for God persons from every tribe and language and people and nation. You have made them to be a kingdom and priests to serve our God, and they will reign on the earth.”
We are saved because, as the Scripture states above, The Lamb purchased men for God with his own blood. Therefore, we cannot take credit for salvation by anything we do. Our focus should be solely on Christ as the One who provided salvation for us as a free gift and not something that can be earned. To drive the point home, if Jesus was standing in between us and the kingdom of God and he was asking each person why he should be allowed in, the answer should be because you paid the penalty for my sins by the shedding of your blood. To add on to that with a list of your own works would be to say that his sacrifice was insufficient.
Conclusion: Trust in Christ alone for your salvation as the One who provided it. Eagerly desire to do good works to bring glory to God and by doing so you are also building up your treasures in heaven.