While I tend to not think of these things in terms that most mainline Christians might understand them, I'll share my perspective here because I think it speaks a truth, which transcends the Christian religion itself..
EVIDENCE FOR GRACE
EVIDENCE FOR WORKS
Romans 11:6
6 And if he chose them by grace, then it is not what they have done that made them his people. If they could be made his people by what they did, his gift of grace would not really be a gift.
Titus 3:5
5 He saved us because of his mercy, not because of any good things we did. He saved us through the washing that made us new people. He saved us by making us new through the Holy Spirit.
Ephesians 2:8-9
8 I mean that you have been saved by grace because you believed. You did not save yourselves; it was a gift from God. 9 You are not saved by the things you have done, so there is nothing to boast about.
__________________________________________________________________________
__________________________________________________________________________
Romans 2: 4-11
4 God has been kind to you. He has been very patient, waiting for you to change. But you think nothing of his kindness. Maybe you don’t understand that God is kind to you so that you will decide to change your lives.
5 But you are so stubborn! You refuse to change. So you are making your own punishment greater and greater. You will be punished on the day when God will show his anger. On that day everyone will see how right God is to judge people. 6 [God] will reward or punish everyone for what they have done. 7 Some people live for God’s glory, for honor, and for life that cannot be destroyed. They live for those things by always continuing to do good. God will give eternal life to them. 8 But others are selfish and refuse to follow truth. They follow evil. God will show his anger and punish them. 9 He will give trouble and suffering to everyone who does evil—to the Jews first and also to those who are not Jews. 10 But he will give glory, honor, and peace to everyone who does good—to the Jews first and also to those who are not Jews. 11 God judges everyone the same. It doesn’t matter who they are.
James 2:14-17
14 What good is it, my brothers and sisters, if someone claims to have faith but has no deeds? Can such faith save them? 15 Suppose a brother or a sister is without clothes and daily food. 16 If one of you says to them, “Go in peace; keep warm and well fed,” but does nothing about their physical needs, what good is it? 17 In the same way, faith by itself, if it is not accompanied by action, is dead.
2 Corinthians 5:10
10 We must all stand before Christ to be judged. Everyone will get what they should. They will be paid for whatever they did—good or bad—when they lived in this earthly body.
So, which is it, and why?
.
What you see above in the passages is speaking how that God's being is nothing that is "earned". God's being is a gift of our existence. To try to imagine one can "buy God" through deeds is the madness of the human ego, infatuated with its own power as if it can attain godhood through heroic efforts.
This same principle is found in many religions. The ego is what stands between you and Enlightenment, Realization, Nirvana, God, or Self. Letting go of the ego allows That Which Is, or the Divine to be realized as something that is there of its own, unearned. It's like claiming you found life, when you are already living it. It's like trying to claim your own lungs as an accomplishment.
That is what is meant by Grace. It's not earned. It's already there. The only thing that stands between us and the realization of our own Lungs, as it were, is the ego. It's all a path of surrendering of our own efforts and allow what is already there to be fully realized in our being, which is what "salvation" points to as a metaphor in Christian parlance.
So now, to address the passages about works, and being judged for right and wrong.
These are actually two separate lines of thought. First the "faith without works is dead" passage. It's actually pretty simple. It's like someone saying they love tomatoes, yet every time you serve those to them they eat everything else but push those off the plate. Clearly, what they say and what they do don't match. That's all this is saying. If you claim you have faith, but yet your behaviors do the opposite of what faith inspires us to do, which is doing good, then that "faith" is dead, or not real faith as another way to put it.
Jesus pointed this out in one of his core teachings, "By their fruits you shall know them". Why? Because faith produces good fruit. "Faith without works is dead". In other words, the fruits are evidence that you have actually realized God in your life. To say you have, and act out of alignment with that, tells a different story.
Now the second part of your quotes about being judged for our deeds.
This is the basic law of Karma. "You reap what you sow," in Christian parlance. What we store up for ourselves, we harvest. Is this the same as 'standing before God in judgment'? Yes, it is. These are universal truths understood on a spiritual level as part of Reality. That Reality has a basic Nature, which when we act out of accord with it, brings us down from it. We "fall" as it were.
It's like floating in a vast sea, where each of us rise or sink according to our own buoyancy. If we do bad deeds, if we heap weight upon ourselves, we sink and fall further from that power of God, or a full illumination or Enlightenment. If we let go of all of that weight, if we surrender it, then we naturally begin to rise, becoming lighter and lighter, until all of life is effortless and full of Peace.
This "judgment" is again simply nothing other than the law of Karma, which is reaping what we sow. So you have three things you touched upon, and while related, they support each other, rather than contradict. Despite how the Bible does contradict itself often, I don't see these as that much at odds.