The word that the Evangelist uses for "agree" is synphonesosin: there is reference made to a "symphony" of hearts. This he took from the heart of God. Agreement in prayer is therefore important as it is welcomed by the Heavenly Father.
Asking together already marks a step towards unity between those who ask. This certainly does not mean that God's answer is in some way determined by our request. We know well: the hoped-for fulfilment of unity depends in the first place on the will of God, whose plan and generosity surpass the understanding of man and his own requests and expectations.
Relying precisely on divine goodness, let us intensify our common prayer for unity, which is more than ever a necessary and very effective means, as John Paul II reminded us in the Encyclical Ut Unum Sint: "Along the ecumenical path to unity, pride of place certainly belongs to common prayer, the prayerful union of those who gather together around Christ himself" (n. 22).
Analyzing these passages in greater depth, we understand better the reason why the Father responds positively to the request of the Christian Community: "For", Jesus says, "where two or three are gathered in my name, there am I in the midst of them".
It is the presence of Christ that makes the common prayer of those gathered in his Name effective. When Christians gather to pray together, Jesus himself is in their midst. They are one with Christ, who is the only mediator between God and man.
The Second Vatican Council's Constitution on the Sacred Liturgy refers precisely to this Gospel passage to indicate one of the ways that Christ is present: "He is present when the Church prays and sings, for he has promised "where two or three are gathered together in my name there am I in the midst of them' (Mt 18: 20)" (Sacrosanctum Concilium, n. 7).
[Pope Benedict, Vespers 25 January 2006]