What he means is nearly this. “God has not cast off His people.” For had He done so, He would have admitted none of them. But if He did admit some, He has not cast them off. Still it is said, if He had not cast off, He would have admitted all. This does not follow; since in Elijah's time the part to be saved had come down to “seven thousand:” and now also there are probably many that believe. But if you do not know who they are, this is no wonder, for that prophet, who was so great and good a man, did not know. But God ordered things for Himself when even the prophet knew them not. But consider his judgment. Now in proving what was before him, he covertly augments the charge against them. For this is why he gave the whole passage, that he might parade before them their untowardness, and show that they had been so from of old. For if he had not wished this, but had directed his whole attention to prove that the people lay in the few, he would have said that even in Elijah's time, seven thousand were left. But now he reads to them the passage further back, as having been throughout at pains to show that it was no strange thing that they did with Christ, and the Apostles, but their habitual practice. For to prevent their saying that it was as a deceiver we put Christ to death, and as impostors that we persecute the Apostles, he brings forward the text which says, “Lord, they have killed Your prophets, and dug down your altars.” Then in order not to make his discourse galling to them, he attaches another reason to the bringing forward of the text. For he quotes it not as if it was on purpose to accuse them, but as if intent upon showing some other things. And he leaves them without any excuse even by what had before been done. For observe how strong the accusation is even from the person speaking. For it is neither Paul, nor Peter, nor James, nor John, but one whom they held in the greatest estimation, the chief of the Prophets, the friend of God, a man who had been so very zealous in their behalf as even to be given up to hunger for them, who even to this day has never died. What then does this man say? “Lord, they have killed Your prophets, and dug down Your altars; and I am left alone, and they seek my life.” What could be more brutal cruelty than this? For when they should have besought pardon for the offenses they had already committed, they were minded even to kill him. And all these things put them quite beyond pardon. For it was not during the prevalence of the famine, but when the season was favorable, and their shame was done away, and the devils (i.e. false gods) had been put to shame, and the power of God had been shown, and the king had bowed beneath it, that they committed these audacities, passing from murder to murder, and making away with their teachers, and such as would bring them to a better mind. What then could they have to say to this? Were they too deceivers? Were they too impostors? Did they not know whence they were either? But they distressed you. Yes, but they also told you goodly things. But what of the altars? The altars too did not surely distress you? Did they too exasperate you? See of what obstinacy, of what insolence they were ever yielding proofs! This is why in another passage too Paul says, when writing to the Thessalonians, You also have suffered like things of your own countrymen, even as they have of the Jews, who both killed the Lord, and their own prophets, and have persecuted us, and please not God, and are contrary to all men; which is what he says here too, that they both dug down the altars, and killed the prophets. But what says the answer of God unto him? “I have reserved to Myself seven thousand men who have not bowed the knee to the image of Baal.” And what has this to do with the present subject? Some may say. It has a great deal to do with the present subject. For he shows here that it is the worthy that God uses to save even if the promise be made to the whole nation. And this he pointed out above when he said, “Though the number of the children of Israel be as the sand of the sea, a remnant shall be saved.” And, “Except the Lord of Sabaoth had left us a seed, we should have become as Sodoma.” And he points it out from this passage also. Wherefore he proceeds to say, “Even so then at this present time also, there is a remnant according to the election of grace.” Observe that each word maintains its own rank, showing at once God's grace, and the obedient temper of them that receive salvation. For by saying election, he showed the approval of them, but by saying grace, he showed the gift of God.
Ver. 6. “And if by grace, then it is no more of works, otherwise grace is no more grace: but if it be of works, then is it no more grace, otherwise work is no more work.”
Source: Homilies on Romans (New Advent)