If we have to do good works to keep our right standing with God, how is salvation by grace alone?
Read the letters of St. John in the New Testament and you will see the delicate but real connection between fulfilling God's commandments and being in his grace. Our Lord himself said, "If you love me keep my commandments." A thing's being or nature is only shown by its actions; if we contradict the life of grace in us by evil deeds, then we cannot be in God's grace. If we show by our deeds that we love God, then our life of grace is strengthened and renewed. We cannot separate the two things, grace and works, completely.
It is true that nothing we can do can place us in God's grace if we have lost it by sin. That is the work of his sheer mercy. But to persevere in God's grace, we have to continue to do the good works "he has prepared for us to walk in," as the apostle says. We cannot make ourselves alive if we are dead, but if we are alive we can cooperate with our Maker in preserving and maintaining the life he has given us. This is simply common sense in the spiritual life.