the most important teaching on this concept is found in Paul's letter to rome
before his conversion, Paul believed that he had to earn a good relationship with god through keeping the jewish law. he was continually frustrated by his inability to do this; the more he tried the more he seemed to fail
because of original sin, it is impossible for humans to earn a good relationship with god- only god's grace makes this possible
humans are invited to respond to god's offer of salvation and eternal life with faith
it is not that faithjustifies a believer: god alone can justify. the faith of the believer is simply the response to the gift of grace.
the believer can then be at peace with god and is able to live a life pleasing to god, but this arises out of the new relationship with god; it is not a way of earning that relationship
this has always been the case, even for those who lived before Jesus- such as Abraham