Because there was neither past nor future in God but only an eternal present, it was ... inaccurate to speak as though God had known in the past what was going to happen in the future, for 'in eternity is present immutably all truth and only truth.' So likewise God did not in fact predestine anything, since 'all things are present to him at once.' It was a reasonable conclusion from the analysis of foreknowledge to argue that 'all the considerations by which I have shown above that free choice is not incompatible with foreknowledge show equally that it is compatible with predestination.' [Pelikan, The Growth of Medieval Theology, 272; quotations are from Anselm, On the Harmony of the Foreknowledge, Predestination, and Grace of God with Free Will, 1.5, 2.2, 2.3, which can be found here]I haven't even read Anselm's work on this yet, but if this quotation is any indication I suspect it's going to be good. Already it seems like the most satisfying approach to reconciling our free will with God's foreknowledge that I've seen. It's not really a question of foreknowledge, since God is outside time. I can barely talk about the subject clearly, because it's so contrary to how we time-bound humans relate to creation. On the one hand I want to say that of course God knows all that I will ever do or think or feel before it has been done - yet at the same time, that's not the proper way to think about the thing, since God is outside time. He doesn't, properly speaking, "foreknow" (which implies being bound by time); he simply knows all things simultaneously. Even that remark - that he knows all things simultaneously - reflects my time-centeredness. But it's the best I can manage.
This sort of brain-bender makes it seem pretty obvious why we have to tread lightly and humbly when we speak of these matters. It's certainly true that God's foreknowledge is perfect; it's likewise certainly true that as moral agents we have free will. How God's sovereign purposes and our freedom are reconciled is beyond our power to comprehend - or at least, it's beyond mine. :-) I'm content to say with St. Thomas
'what the saints say in common,' namely, Dionysius, Augustine, and Anselm: 'that the reason why someone does not have grace is that he refused to accept it, and not that God refused to grant it.' [Pelikan, op. cit., 273; quoting Aquinas, Commentary on the Sentences, I, 40, 4, 2]That seems to be the stone over which Calvinists stumble, in that they say God withholds grace from some: he passes them over. They prefer to frame it positively of course, saying that the wonder is really that he has mercy on anyone; but the unpleasant fact remains that on Calvin's formulation some are doomed not simply because of their own choice but because God chooses not to "irresistibly" grant them the grace they say he "irresistibly" grants to the elect. The Catholic Faith says otherwise.