The following is an excerpt from
The MacArthur New Testament Commentary on Matthew 18.
Jesus first assures His people that the Father acts with them when they work to purify the church: Again I say to you, that if two of you agree on earth (referring back to the two witnesses of v. 16) about anything that they may ask (in seeking the purity of the church) it shall be done for them by My Father who is in heaven. When the church acts in God’s behalf and in accordance with His Word in matters dealing with sin, He acts in their behalf by confirming and empowering their faithful decisions and actions.
Agree is from sumphoneo, which literally means to sound together and is the term from which we get symphony. If even two of Jesus’ followers are in agreement with each other that a sinning believer has either repented or refused to repent, they can be sure they are also in agreement with the Father who is in heaven.
To interpret this verse as promising believers a blank check for anything they might agree to ask God for not only does not fit the context of church discipline but does violence to the rest of Scripture. Such an interpretation is tantamount to magic, in which God is automatically bound to grant the most foolish or sinful request, simply because two of His children conspire to ask Him for it. The idea flies in the face of God’s sovereignty and completely undercuts the countless scriptural commands for believers’ obedient submission to His will.
Jesus also assures His people that He Himself acts with them when they work to purify the church: For where two or three have gathered together in My name, there I am in their midst. Not only does the Father confirm discipline when it is administered according to His Word, but the Son adds His own divine confirmation.
This verse is also frequently misinterpreted, though not with such serious error as in the misinterpretations of the two previous verses. To use this statement to claim the Lord’s presence at a small worship service or prayer meeting does not fit the context of church discipline and is superfluous. Christ is always present with His people, even with a lone believer totally separated from fellow Christians by prison walls or by hundreds of miles.
The context demands that the two or three are witnesses in the process of discipline. To ask or to do anything in God’s name is not to utter His name but to ask and to work according to His divine will and character. For the witnesses to have gathered in His name is therefore for them to have faithfully performed their work of verifying the repentance or impenitence of a sinning brother or sister on the Lord’s behalf. When the church gathers in the Lord’s name and for His cause and glory, it must be engaged in self-purifying ministry under His power and authority, and with His heavenly confirmation and partnership.