The following passage is in the context of Jacob fleeing from Esau, his murderous brother, by leaving his home at Beersheba and heading to his maternal ancestor's homeland in Haran. Jacob met Yahweh for the first time at Bethel (Hebrew - "House of God") and the Lord revealed himself in a dream re-ratifying the covenant with Abraham's descendants.
“Jacob left Beersheba and went toward Haran. And he came to a certain place and stayed there that night, because the sun had set. Taking one of the stones of the place, he put it under his head and lay down in that place to sleep. And he dreamed, and behold, there was a ladder set up on the earth, and the top of it reached to heaven. And behold, the angels of God were ascending and descending on it! And behold, the LORD stood above it and said, “I am the LORD, the God of Abraham your father and the God of Isaac. The land on which you lie I will give to you and to your offspring. Your offspring shall be like the dust of the earth, and you shall spread abroad to the west and to the east and to the north and to the south, and in you and your offspring shall all the families of the earth be blessed. Behold, I am with you and will keep you wherever you go, and will bring you back to this land. For I will not leave you until I have done what I have promised you.” Then Jacob awoke from his sleep and said, “Surely the LORD is in this place, and I did not know it.” And he was afraid and said, “How awesome is this place! This is none other than the house of God, and this is the gate of heaven.” (Genesis 28:10–17 ESV)At the beginning of Jesus' earthly ministry - Jesus used the same imagery to give Nathanael a better perspective about His intentions for mankind.
“Philip found Nathanael and said to him, “We have found him of whom Moses in the Law and also the prophets wrote, Jesus of Nazareth, the son of Joseph.” Nathanael said to him, “Can anything good come out of Nazareth?” Philip said to him, “Come and see.” Jesus saw Nathanael coming toward him and said of him, “Behold, an Israelite indeed, in whom there is no deceit!”Nathanael said to him, “How do you know me?” Jesus answered him, “Before Philip called you, when you were under the fig tree, I saw you.”Nathanael answered him, “Rabbi, you are the Son of God! You are the King of Israel!” Jesus answered him, “Because I said to you, ‘I saw you under the fig tree,’ do you believe? You will see greater things than these.”And he said to him, “Truly, truly, I say to you, you will see heaven opened, and the angels of God ascending and descending on the Son of Man.” (John 1:45–51 ESV)One interesting aspect of the story is the parallel of Bethel (patriarchal ties, major cult site throughout Israel's history) and Nazareth (no mentioning, no importance, no religiousness). From a historical perspective Bethel was eternally cognizant in the minds of every Jew - whereas Nazareth was completely forgettable. The Branch was about to change that dynamic.
Even more interesting is the connection between Jacob and Nathanael. Here is what Jesus is saying to Nathanael - "you think it's amazing that I knew what you were thinking under the fig tree - here's how amazing I am - I was there when Yahweh revealed himself to Jacob - in fact I am the Ladder - the Ladder is the only way to have access to the Father - Jacob learned that, you will have to as well. Jacob only saw the Ladder in a dream, but you are talking to the Ladder face to face."