Romans 11 is the concluding chapter of Paul's doctrinal exposition. His letter to Christian house churches in Rome is meant to outline his preaching points for his mission to Iberia, to explain his core doctrines as well as do a little educating to his new sponsers. It's a brilliant book, which means that it may not make sense in the first reading...or the second or the third. Which is one reason why Paul ends this chapter and this section with burst of poetic genius:
"Oh, the depth of the riches of the wisdom and knowledge of God!
How unsearchable his judgments,
and his paths byeond tracing out!
Who has known the mind of the Lord?
Or who has been his counselor?
Who has ever given to God,
that God should repay them?
For from him and through him and to him are all things.
To him be the glory forever!
The immediate context of his letter that prompts this moving prayer is his explanation about Israel's role in the gospel coming to the Gentiles (nonJews). He starts the chapter by referencing 1Kings and quoting Deuteronomy and Isaiah, noting that just when it seems that Israel was abandoned, God revealed that he had chosen a remnant (by grace) who would worship Him, and that there were those whom he had hardened their hearts and darkened their eyes (this is a hard teaching to accept...Luther contends that only very mature believers should delve into this doctrine).
But Paul doesn't stop there, he goes on to use the metaphor of an olive tree to explain how the Gentiles and Jews are bound together. The disobedience of the Jews has resulted in salvation for the Gentiles. Paul makes much of this fact, he even says that he hopes that all these Gentiles getting delivered elicits envy out of the Jews, and that this will provoke them to obedience and salvation. (I'll never forget the first time I read this passage or heard it preached on, it was with Dennis Miller, sitting in the olive grove outside Jerusalem, in the area where Jesus was alleged to have been crucified and buried...a powerful moment).
But Paul doesn't stop there also, he writes that the Jews will have hardened hearts until the full number of Gentiles "has come in." And then he says that through this, all Israel will be saved. What? He ends this section with this phrase: "For God has bound everyone over to disobedience so that he may have mercy on them all." Who is he talking about? He just opened the chapter by describing the elect/chosen status of a remnant and the damned. Now he is saying that all will receive mercy?
Rather than expanding on that even more, he breaks into his poetic prayer.
Without delving in too deep, I think that Paul is attempting to do at least two things (he is writing to a Jewish Christian and Gentile Christian church): affirm the Jewish Christians their special place in God's will and work, to help the Gentile Christians see their place in God's will and work (hence the use of the olive tree). Paul also wants to highlight the role of grace/mercy in the salvation of both Jews and Gentiles. For the reason of why some people just won't respond to God's grace/mercy, Paul uses the language of "hardened, darkened, etc." Some people just won't let themselves be redeemed. But for those who do, we can all sing together Paul's eloquent doxology.