I say then, God has not rejected His people, has He? May it never be! For I too am an Israelite, a descendant of Abraham, of the tribe of Benjamin. God has not rejected His people whom He foreknew. Or do you not know what the Scripture says in the passage about Elijah, how he pleads with God against Israel? “Lord, they have killed Your prophets, they have torn down Your alters, and I alone am left, and they are seeking my life.” But what is the divine response to him? “I have kept for Myself seven thousand men who have not bowed the knee to baal.” In the same way then, there has also come to be at the present time a remnant according to God’s gracious choice. But if it is by grace, it is no longer on the basis of works, otherwise grace is no longer grace.
The reference to “His people” is to the nation of Israel whom God “foreknew.” God will preserve Israel, just as He preserved the 7,000 prophets in hiding who were being sought for death by Jezebel. (1st Kings 19:1-18) As a backdrop, just as God hardened [already] obstinate Pharaoh, in order to provide a testimony to the world, so too has God hardened [already] obstinate Israel, in order to reach the Gentile world, but only for a while, until the fulfillment of the times of the Gentiles (Romans 11:25), and then, “all Israel will be saved.” (Romans 11:26)
John Calvin comments: “Indeed one passage from Paul suffices to put a stop to all controversy. God, he says, declines to repudiate His people whom He foreknew (Rom 11:2). And shortly after he declares what this knowledge was, that there was a remnant saved according to the election of grace (v.5). He says again (v.7) that Israel did not by works obtain what it sought, but election did obtain it. What he called foreknowledge in the first passage, he afterwards defines as election--and that gratuitous.” (Concerning the Eternal Predestination of God, pp.71-72, emphasis mine)
Romans 11:7-9
What then? What Israel is seeking, it has not obtained, but those who were chosen obtained it, and the rest were hardened; just as it is written, “God gave them a spirit of stupor, eyes to see not and ears to hear not, down to this very day.” And David says, “Let their table become a snare and a trap, and a stumbling block and a retribution to them.”
Romans 11:28-32
From the standpoint of the gospel they are enemies for your sake, but from the standpoint of God’s choice they are beloved for the sake of the fathers; for the gifts and the calling of God are irrevocable. For just as you once were disobedient to God, but now have been shown mercy because of their disobedience, so these also now have been disobedient, that because of the mercy shown to you they also may now be shown mercy. For God has shut up all in disobedience so that He may show mercy to all.