To be fair, we must understand that salvation is of grace, and not of works. It the gift of God (Eph 2:8-9). However, what is meant by this, as well as other passages of scripture such as Romans 4:2-5, is that we as sinful human beings cannot earn our salvation by our own self effort. An attempt to reform our lives, give up some sin, trying to be "good", so that we can avoid hell, and instead go to heaven, is only a selfish effort, where we are still on the throne of our lives, and self is still more important than God.
The thing that separates us from God, and incurs His wrath, is sin, our disobedience to Him. In Romans 8:7, we read that the mind set on the flesh, that is, the individual who is living for themselves, is hostile toward God, and does not, and cannot submit to the law of God! A large segment of evangelical Christianity would agree that sin separates us from God, and agree that in Christ Jesus we find forgiveness for our sin, but they stop short. In their understanding, forgiveness is the end, and from that point on, our behavior and actions have no bearing upon salvation. We must ask ourselves this question however, "How can we be saved, if we are claiming forgiveness, but still living in the rebellious behavior that separates us from God in the first place?"
There are many passages in scripture that speak to this issue, and we will look at two of them.
Although He was a Son, He learned obedience from the things which He suffered. And having been made perfect, He became to all those who obey Him the source of eternal salvation.
Hebrews 4:8-9 NASB
Read this carefully. Just as Jesus was submitted to His Father, and obeyed Him, we too must submit to Christ in obedience. This might shock some of you, but It is God's word none the less. Jesus, according to these verses, is the source of salvation to those who obey Him. It does not say to all regardless of their obedience or disobedience, but to those who obey!
Look at this next passage of scripture as well. I will quote it from the King James version, as I believe that it more accurately portrays the meaning of this passage.
And behold, I come quickly; and my reward is with me, to give every man according as his work shall be. I am Alpha and Omega, the beginning and the end, the first and the last. Blessed are they that do his commandments, that they may have right to the tree of life, and may enter in through the gates into the city. For without are dogs, and sorcerers, and whoremongers, and murderers, and idolaters, and whosoever loveth and maketh a lie.
Rev 22:12-15 KJV
Again, notice the emphasis on obedience. Those who are disobedient do not have right to the tree of life, or access to the holy city. Barred from entrance are those who are sinful. More modern translations substitute "washed their robes", for "do his commandments", but the context of Jesus rewarding us for our deeds, and the fact that the wicked are barred entrance to the city, are in keeping with the King James rendering.
What does it mean to have right to the tree of life? "I thought that we cannot merit salvation", you might ask? Understand this very carefully. God, in His grace, will only confer this "right" on those who are surrendered to Him in a loving, obedient, relationship. Real, biblical salvation is a coming out of the world, a giving up of self, a turning from sin, and an embracing of Christ and His teachings, in an all encompassing surrender. To know Christ, and to follow Christ, is to obey Christ. It is that simple. A salvation that allows one to sin regularly, and carelessly, is no salvation at all, as Jesus came to destroy the devils work, and set the captives free from the bondage of sin (1 John 3:8; John 8:36).