There are some Bible verses that when taken out of context can be dangerous. One such verse is Mt. 18:19.
Again I say to you, if two of you agree on earth about anything they ask, it will be done for them by my Father in heaven.
Taken by itself it sounds like magic. Two people get together, they agree to pray for something, and God gives them whatever they ask for. People love to quote this verse because it seems to be about power, the ability to tell God, what to do, to have God do our bidding.
But look at the rest of chapter 18, look at the verses that surround this one, see the context.
At the end of chapter 17 Jesus has just told his disciples that he is going to die. The response of the beginning of chapter 18 is to ask who is the greatest? Jesus then he gives is the command to be like little children. And the entire rest of the chapter is dedicated to the subjects of sin, forgiveness, and reconciliation.
Immediately before this verse is the instruction on dealing with sinners: first one on one, then with a small group, then with the entire church – excommunication. Immediately following this verse is the answer to the question how many times must I forgive. And in Matthew the answer is 70 times 7 times.
Jesus is preparing the church for the time when he will not be physically in their midst. He knows that there is going to be sin and division. But he also knows that forgiveness and reconciliation are possible.
This versus similar to Matthew 7:7
Ask, and you shall receive; seek, and you will find; knock, and it will be opened to you.
In that verse he never promises that what you receive is what you ask for, what you find is what you seek, or what's behind the door. God gives us what we need, we find what we need to find, and God opens the door that we need to walk through. As Jesus explains in verse 11,
If you then, who are evil, know how to give good gifts to your children, how much more will your Father who is in heaven give good things to those who ask him!
The word used in verse 19 for agree is the verb symphoneo, from which we get the word symphony, to speak harmoniously. What Jesus is saying here is that if two people can even find one thing on earth about which they can be in harmony. God will grant "it". But what is the "it"? From the context in which the verse sits it would seem most likely that the "it" is not whatever we want, but rather forgiveness, reconciliation and peace.
God remains the ONE in charge. No matter what we ask for, he will only ever give us what is good for us.