A few examples from Rabbinic literature will give the general feel of how the rabbis of ancient Judaism understood the Shechinah and the promises of God's presence:
Rabin b. R. Adda says in the name of R. Isaac: How do you know that the Holy One, blessed be He, is to be found in the Synagogue? For it is said: God standeth in the congregation of God. (Psalm 82:1) And how do you know that if ten people pray together the Divine presence is with them? For it is said: ‘God standeth in the congregation of God’. And how do you know that if three are sitting as a court of judges the Divine Presence is with them? For it is said: In the midst of the judges He judgeth. (Psalm 82:1) And how do you know that if two are sitting and studying the Torah together the Divine Presence is with them? For it is said: Then they that feared the Lord spoke one with another; and the Lord hearkened and heard, and a book of remembrance was written before Him, for them that feared the Lord and that thought upon His name. (Malachi 3:16) (What does it mean: ‘And that thought upon His name’? — R. Ashi says: If a man thought to fulfill a commandment and he did not do it, because he was prevented by force or accident, then the Scripture credits it to him as if he had performed it.) And how do you know that even if one man sits and studies the Torah the Divine Presence is with him? For it is said: In every place where I cause My name to be mentioned I will come unto thee and bless thee. (Exodus 22:21) Now, since the Divine presence is even with one man, why is it necessary to mention two? — The words of two are written down in the book of remembrance, the words of one are not written down in the book of remembrance. Since this is the case with two, why mention three? — I might think the dispensing of justice is only for making peace, and the Divine Presence does not come to participate. Therefore he teaches us that justice also is Torah. Since it is the case with three, why mention ten? — To a gathering of ten the Divine Presence comes first, to three, it comes only after they sit down. (Berachoth 6a)
When two scholars are amiable to each other in their discussions in halachah, the Holy One, blessed be He, gives heed to them, for it is said, Then they that feared the Lord spoke one with another: and the Lord hearkened, and heard. (Malachi 3:16) Shabbath 63a
When two scholars pay heed to each other in halachah, the Holy One, blessed be He, listens to their voice, as it is said, Thou that dwellest in the gardens, The companions hearken to thy voice: Cause me to hear it. (Song of Solomon 8:13) But if they do not do thus, they cause the Shechinah to depart from Israel, as it is said, Flee, my beloved, and be thou like, etc. (Song of Solomon 8:14). Shabbath 63a.
When two disciples form an assembly in halachah, the Holy One, blessed be He, loves them, as it is said, and his banner over me was love. (Song of Solomon 2:4). Shabbath 63a.
[T]wo that sit together and are occupied in words of Torah have the Shechinah among them ... [T]hree that have eaten at one table, and have said over it words of Torah, are as if they had eaten of the table of the place, blessed is He, for it is said, And he said unto me, This is the table that is before the Lord. (Pirke Aboth 3)
All this is background to establish the Jewish tradition that whenever and wherever people are gathered around the Word of God, the presence of God is with them. This Jewish tradition was derived from a careful and loving study of the intricate details of God's word, with a focus on when and where God had promised his presence of blessing to his people.
The reason I mention this here and now is to provide better knowledge of the context in which Jesus' words were meant to be understood. Some scholars have contended that the Synoptic Gospels never portray Jesus in terms suggesting his divinity, and that Jesus in the Synoptic Gospels never portrays himself in terms suggesting his divinity. However, this does not take adequate account of how the terms would have been heard by Jewish hearers. The book of Matthew in particular assumes some familiarity with Jewish customs and thought. It is here in the book of Matthew that we find Jesus' saying recorded:
For where two or three come together in my name, there am I with them. (Matthew 18:20).Jesus' remark that he could be present whenever and wherever people come together in his name is remarkable in itself. However, given the Jewish background of Jesus and his earliest hearers, and the likely Jewish audience of the Gospel of Matthew, it becomes a more pointed reference. In saying that he is the presence who is with believers when they come together, Jesus is identifying himself as the Presence of God, the Shechinah so often mentioned in the Torah and discussed by the Rabbis. This is the implication when he says, "Whenever two or three come together ... there am I with them."
The part omitted in the quote just previous is at least as remarkable: "whenever two or three come together in my name, there am I with them." The Scripture contains many promises of the Presence of God which the Rabbis discussed. These promises spoke of the blessing of God's presence on those gathered together either in God's name or to study the Torah, things that tend to occur together. In saying that the blessing fell when people were gathered in his name, Jesus draws the parallel that he is either the Torah -- the Word of God -- or God; he is the one in whose name people are gathered when studying the Torah and learning of God.