The question makes perfect sense, and the key to understanding it is actually simple.
A distinction needs to be made. There are two differents senses in which we speak of God willing something. God can will either antecedently or consequently. Antecedently means before anything else happens, and consequently refers to a kind of dependence upon something else. You can think of consequent willing as containing an “if” clause.
I will to throw you a party if you pass the big test. Am I willing the party? Yes. What if the party doesn’t happen? Does that mean that I failed somehow to carry out my will? No, because my will act involved an outside component. In a similar way, God wills all men to get to Heaven. Do all men get to Heaven? No. We say that God antecedently will the Salvation of all (before any thing else is considered), but also say that God conseqently wills some men to be damned (as a result of their free will decision to resist Him).
Prayer can work in a similar way. God’s will might be that you get a promotion at your job, but only if you fervently pray for it. Thus, God’s will isn’t changed by your prayer because His will always took into consideration what you would do, but we can also say in a real sense that the grace God gives you is in response to your prayer, because you would not have received it had you not prayed.