"Even so then, at this present time there is a remnant according to the election of grace. And if by grace, then it is no longer of works; otherwise grace is no longer grace. But if it is of works, it is no longer grace; otherwise work is no longer work" (Romans 11:5-6).
Just as God gathered a remnant of His people back to Jerusalem after their Babylonian captivity and exile, He is now gathering a remnant for salvation "according to the election of grace." Here, and throughout the book of Romans, grace (which is heard in the truth of the gospel, Colossians 1:5-6) is set in contrast to law keeping (the law of Moses) as the means of justification (Romans 3:21-26). Grace is not obtained through law-keeping, for if one keeps the law (without sin), then his reward is a debt earned, not a gift given (Romans 4:1-8; Ephesians 2:8-9).
So, how does God execute "the election of grace?" God elected (chose) to save sinners in Christ (Ephesians 1:4-6). Through the blood of Christ, God makes forgiveness of sins available "according to the riches of His grace" (Ephesians 1:7). God calls sinners out of sin into salvation by the gospel (2 Thessalonians 2:13-14). Faith obeys God and obtains grace, just like Abraham and his faith (Romans 4:16; James 2:21-24).
We are saved "by grace through faith," not by earning grace, but with a faith that takes God at His word and does what He says. Christians do that, and stand in the "true grace of God" (1 Peter 5:12).