Question: Can one earn salvation?
Answer: The answer is an emphatic No.
There is absolutely no way man can meritoriously achieve salvation. The scriptures are replete with teaching to this end. "Not by works of righteousness which we have done," Paul writes, "but according to his mercy he saved us..."(Tit. 3:5). Salvation is a "gift of God" offered to man in his state of utter helplessness (Eph. 2: 1-8). Salvation is "not of yourselves...not of words, lest any man should boast" (2:9). Abraham and David exemplify the truth that one can not merit ("worketh") salvation (Rom. 4:1-8).
While man can not earn salvation, works are required. In Titus 3:5 where Paul affirmed we are not saved by works, Paul goes on to say we are saved...by the washing of regeneration..." Obviously, baptism is meant. In the text in which we are told "for by grace are ye saved," Paul says "through faith" (Eph. 2:8). Grace is God's part: faith is man's part. Active, obedient faith is required (Gal. 5:6, Jas. 2:24).
The Bible does not contradict itself in the matter of man's salvation. Religionist commonly array works (any kind) and salvation. Beloved, the truth is man cannot be saved without obedience (Heb. 5:8,9) However, it is God's grace that saves. This is because man alone can never effect redemption (cf. Matt. 18:22-27). Nonetheless, man's obedience is indispensable in salvation (Acts 2:36-41).
Jesus summed it up when he taught: "So likewise ye, when ye shall have done all those things which are commanded you, say we are unprofitable servants: we have done that which was our duty to do." (Luke 17: 10).