The good works that any person accomplishes are the consequence of God working in the person, not the person doing them through his or her efforts. May I never boast except in the cross of our Lord Jesus Christ, through which the world has been crucified to me, and I to the world. The point in the book of James, as well as the point with this classic text, is that salvation is not simply an academic or theoretical sort of thing. Rather, salvation inevitably leads to good works. James' point, essentially, is to wonder how a person can have faith without it having some rather significant imapact on one's life.
Good works are the natural, inevitable consequence of grace.
Other significant passages relating to the expression of salvation by grace can be found throughout the Bible. The passages in Romans you are doubtless familiar with. Additionally, the Old Testament illustrates that salvation is by grace through faith, rather than by works. But thanks to that passage and others, we understand that our righteousness really isn't ours at all, but rather is Christ's in us. One last passage which illustrates the tension.