"... if two of you on earth agree about anything ...” (Matthew 18:19)

"Again I tell you that if two of you on earth agree about anything you ask for, it will be done for you by my Father in heaven. For where two or three come together in my name, there am I with them.” (Matthew 18:19)

What does Jesus mean by 'anything you ask for'?

What is the significance of two or three of his followers coming together in Jesus' name? Does this mean that groups of more than two can combine to make up new rules and appoint teachers like deacons and other types of councils do?

Not exactly. Jesus was speaking specifically about "anything you ask for." The key to understanding this phrase is the Greek word αἰτέω (aiteō), here translated to "ask." This word can also mean to "beg."

Jesus is speaking of prayer. Multiple people praying for the same thing. Jesus is suggesting that if multiple people come together to pray in his name then he will be there for them, supporting them in their quest to grow closer to God.

Jesus is not talking about praying for material things. He isn't talking about praying for wealth or to win a football game. In the Lord's Prayer, Jesus suggests we pray for:
-Praising God ("Hallowed by Your Name")
-Asking to serve God ("Your will be done on earth")
-Helping us grow spiritually ("Give us today our daily bread")
-Forgiveness ("Forgive our debts")
-Saving us ("deliver us from evil")

When Jesus says, "come together in my name" he isn't speaking of his name only. He is speaking of coming together for the purpose of following Jesus' teachings - the foremost of which is to love God.

God and Jesus are attracted by relationships. Particularly relationships of sharing and giving. When two or three people come together for the same purpose there is a meeting of minds. When they come together with the purpose of pleasing God, that combined mission pleases God and His loving servants.

Jesus is wanting his followers to come together to glorify God and pray for spiritual strength and guidance. It means praising God, as Jesus and his students did regularly:
When they had sung a hymn, they went out to the Mount of Olives. (Matthew 26:30)

What does 'sung a hymn' mean?

It means they sang praises to God. They praised God and virtues on a regular basis. While praising God is not emphasized much by some institutions today, it was an important practice for Jesus and his followers, and among the Prophets and teachers of the Old Testament:
Seth also had a son, and he named him Enosh. At that time men began to call on the Name of the LORD. (Genesis 4:25)

From there he went on toward the hills east of Bethel and pitched his tent, with Bethel on the west and Ai on the east. There he built an altar to the LORD and called on the Name of the LORD. (Genesis 12:8)

and where he had first built an altar. There Abram called on the Name of the LORD. (Genesis 13:4)

Abraham planted a tamarisk tree in Beersheba, and there he called upon the Name of the LORD, the Eternal God. (Genesis 21:33)

Isaac built an altar there and called on the Name of the LORD. There he pitched his tent, and there his servants dug a well. (Genesis 26:25)

he may minister in the Name of the LORD his God like all his fellow Levites who serve there in the presence of the LORD. (Deuteronomy 18:7)

I will proclaim the Name of the LORD. Oh, praise the greatness of our God! (Deuteronomy 32:3)

After he had finished sacrificing the burnt offerings and fellowship offerings, he blessed the people in the Name of the LORD Almighty. (2 Samuel 6:18)

The people, however, were still sacrificing at the high places, because a temple had not yet been built for the Name of the LORD. (1 Kings 3:2)

I intend, therefore, to build a temple for the Name of the LORD my God, as the LORD told my father David, when he said, 'Your son whom I will put on the throne in your place will build the temple for my Name.' (1 Kings 5:5)

"My father David had it in his heart to build a temple for the Name of the LORD, the God of Israel. (1 Kings 8:17)

"The LORD has kept the promise he made: I have succeeded David my father and now I sit on the throne of Israel, just as the LORD promised, and I have built the temple for the Name of the LORD, the God of Israel. (1 Kings 8:20)

When the queen of Sheba heard about the fame of Solomon and his relation to the Name of the LORD, she came to test him with hard questions. (1 Kings 10:2)

Then you call on the name of your god, and I will call on the Name of the LORD. The god who answers by fire—he is God." (1 Kings 18:24)

With the stones he built an altar in the Name of the LORD, and he dug a trench around it large enough to hold two seahs of seed. (1 Kings 18:32)

But Naaman went away angry and said, "I thought that he would surely come out to me and stand and call on the Name of the LORD his God... (2 Kings 5:11)

Ascribe to the LORD the glory due His Name. Bring an offering and come before Him; worship the LORD in the splendor of His Holiness.
(1 Chronicles 16:28-30)

So David went up in obedience to the word that God had spoken in the Name of the LORD. (1 Chronicles 21:19)

David said to Solomon: "My son, I had it in my heart to build a house for the Name of the LORD my God. (1 Chronicles 22:7)

Now devote your heart and soul to seeking the LORD your God. Begin to build the sanctuary of the LORD God, so that you may bring the ark of the covenant of the LORD and the sacred articles belonging to God into the temple that will be built for the Name of the LORD." (1 Chronicles 22:18-19)

Now I am about to build a temple for the Name of the LORD my God and to dedicate it to Him for burning fragrant incense before Him, for setting out the consecrated bread regularly, and for making burnt offerings every morning and evening and on Sabbaths and New Moons and at the appointed feasts of the LORD our God. (2 Chronicles 2:4)

"Naked I came from my mother's womb, and naked I will depart. The LORD gave and the LORD has taken away; may the Name of the LORD be praised." (Job 1:21)

I will give thanks to the LORD because of his righteousness and will sing praise to the Name of the LORD Most High. (Psalm 7:16-17)

Some trust in chariots and some in horses, but we trust in the Name of the LORD our God. (Psalm 20:7)

Praise the LORD. Praise, O servants of the LORD, praise the Name of the LORD. (Psalm 113:2)

Let the Name of the LORD be praised, both now and forevermore. (Psalm 113:2)

From the rising of the sun to the place where it sets, the Name of the LORD is to be praised. (Psalm 113:3)

I will lift up the cup of salvation and call on the Name of the LORD. (Psalm 116:13)

I will sacrifice a thank offering to you and call on the Name of the LORD. (Psalm 116:17)

Blessed is he who comes in the Name of the LORD. (Psalm 118:26)

That is where the tribes go up, the tribes of the LORD, to praise the Name of the LORD according to the statute given to Israel. (Psalm 122:4)

Our help is in the Name of the LORD, the Maker of heaven and earth. (Psalm 124:7)

Praise the LORD. Praise the Name of the LORD; praise him, you servants of the LORD, (Psalm 135:2)

Let them praise the Name of the LORD, for He commanded and they were created. (Psalm 148:5)

Let them praise the Name of the LORD, for His Name alone is exalted; his splendor is above the earth and the heavens. (Psalm 148:13)

The Name of the LORD is a strong tower; the righteous run to it and are safe. (Proverbs 18:10)

Therefore in the east give glory to the LORD; exalt the Name of the LORD, the God of Israel, in the islands of the sea. (Isaiah 24:15)

Who among you fears the LORD and obeys the word of his servant? Let him who walks in the dark, who has no light, trust in the Name of the LORD and rely on his God. (Isaiah 50:10)

And foreigners who bind themselves to the LORD to serve him, to love the Name of the LORD, and to worship Him (Isaiah 56:6)

At that time they will call Jerusalem The Throne of the LORD, and all nations will gather in Jerusalem to honor the Name of the LORD. No longer will they follow the stubbornness of their evil hearts. (Jeremiah 3:17)

You will have plenty to eat, until you are full, and you will praise the Name of the LORD your God, who has worked wonders for you; never again will my people be shamed. (Joel 2:26)

And everyone who calls on the Name of the LORD will be saved; for on Mount Zion and in Jerusalem there will be deliverance, as the LORD has said, among the survivors whom the LORD calls. (Joel 2:32)

"Then will I purify the lips of the peoples, that all of them may call on the Name of the LORD and serve him shoulder to shoulder. (Zephaniah 3:9)

But I will leave within you the meek and humble, who trust in the Name of the LORD. (Zephaniah 3:10)

The crowds that went ahead of him and those that followed shouted, "Hosanna to the Son of David!" "Blessed is he who comes in the Name of the Lord!" "Hosanna in the highest!" (Matthew 21:9)

For I tell you, you will not see me again until you say, 'Blessed is he who comes in the Name of the Lord.' " (Matthew 23:38)

"Blessed is the king who comes in the Name of the Lord!" "Peace in heaven and glory in the highest!" (Luke 19:38)

And everyone who calls on the Name of the Lord will be saved.' (Acts 2:21)

"Everyone who calls on the Name of the Lord will be saved." (Romans 10:13)
Calling on God's Names can be done quietly, in private, and amongst our friends. Note also that from the Scriptures we find that God does indeed have a Name. He has multiple Names, including Jahweh, Jehovah, Eloi, Abba and others. He also has Names in other languages and faiths as well. Each of God's Names, regardless of the language or faith, has the power to connect us with the Supreme Being.

Why is praising God so important?

Praising someone is a facility we all use to endear someone. It is a way of connecting with someone. When we praise God we are providing a means or facility to get close to God - to open our hearts to Him.

Think about why we might praise anyone or call their name: To invoke them. To reach out to them. We praise someone or call out someone's name when we want to relate with them. When we want to connect with them.

It is the same as praising and calling on God's Name. When God's Name is praised, we are attempting to establish a relationship with Him. This is pleasing to the Supreme Being. Why? Because the Supreme Being enjoys relationships. This is why we were created in the first place: To exchange a relationship with God.

This is also why everyone is constantly looking for relationships. In fact, each of us is looking for that perfect person to love and exchange a relationship with. We each search for our soulmates, and when we think we find them, we might marry them, only to find out later that they are not the perfect person we expected them to be.

The Supreme Being is the Perfect Person we've been looking for. As we search for our soulmate here on earth, we are actually looking for the Supreme Being.

When we share our relationship with the Supreme Being with others, this is particularly pleasing to Him. The Supreme Being enjoys multiple relationships. He is pleased when we share with others what we share with Him - love.

This is the reason Jesus' second-most-important instruction is connected to the first:
“ ‘Love the Lord your God with all your heart and with all your soul and with all your mind.' This is the first and greatest commandment. And the second is like it: ‘Love your neighbor as yourself.’ All the Law and the Prophets hang on these two commandments.” (Matt. 22:37-40)
And this is the reason why Jesus would be pleased when people come together to praise God, and help to complete his mission of asking everyone to love and serve the Supreme Being.