That is from Matthew 18:20 where it says:
“For where two or three come together in my name, there am I with them.”
Many Bible Christians say that this is all it takes to form a Church. The funny thing about this is that in the exact same chapter of Matthew, just 5 verses before, we read this:
“If your brother sins against you, go and show him his fault, just between the two of you. If he listens to you, you have won your brother over. But if he will not listen, take one or two others along, so that ‘every matter may be established by the testimony of two or three witnesses.’ If he refuses to listen to them, tell it to the church; and if he refuses to listen even to the church, treat him as you would a pagan or a tax collector.”
It also occurs only two chapters after the famous Petrine text in Matthew 16:
Jesus replied, “Blessed are you, Simon son of Jonah, for this was not revealed to you by man, but by my Father in heaven. And I tell you that you are Peter, and on this rock I will build my Church, and the gates of Hades will not overcome it. I will give you the keys of the kingdom of heaven; whatever you bind on earth will be bound in heaven, and whatever you loose on earth will be loosed in heaven.” Then he warned his disciples not to tell anyone that he was the Christ.
Remember, in the original texts there were no numberings of Chapter and Verse. It was simply “The Gospel of Matthew”…one long book. The ideas naturally flowed. Given the immediate context of the original quote above, I think we can clearly see what Matthew’s idea of “Church” is.
So, the obvious question presents itself: “If all it takes are two people gathered in Jesus’s name to form a ‘Church’, then what’s to stop some rogue who won’t listen to the ‘Church’ from rebelling from that ‘Church’ and forming his own ‘Church’?” It makes a farce of the idea of authority, and even of the idea of “Church” because if all it takes is some clique to say, “We’re gathered in Jesus’s name, therefore we have His authority,” there is no real way that group can anathematize an individual as Jesus commanded in the quote above. Why not? Because that person can simply gather a few people together and start their own Church.
Hey wait. That’s Protestantism.
The only way to avoid this anarchy is to realize that the Church is continuous from Apostolic times, and that visible, recognizable body still has the authority to excommunicate, and it still has the authority to determine what doctrine is right and wrong (and thus, excommunicate on those grounds). That body is governed by the one who holds the Key’s of the Kingdom (Matt 16:19), the successor to St. Peter, the Bishop of Rome, the Pope.
Now, that’s a safeguard against what some try to make the original quote mean. As far as what a Catholic should take from this passage, I think the above posters did a good job of answering, so I won’t repeat them.