The sceptre shall not depart from Judah, nor a lawgiver from between his feet, until Shiloh come; and unto him shall the gathering of the people be.” — Genesis 49:10

The above passage is from the death-bed blessing’s of Jacob (Israel) to his son’s.  It is when he is blessing Judah, from whom Christ will come, that he recites the above passage.

The sceptre refers to the right to rule.  From Wikipedia:

sceptre (or scepter in U.S. English) is a symbolic ornamental staff or wand held in the hand by a ruling monarch as an item of royal or imperial insignia. Sometimes, it could be used for showing a sense of divinity.”

The lawgiver would also refer to the ruler, as the one who gives and enforces laws.  Thus, this passage is referring to the fact that rulers of Israel would come from the tribe of Judah, beginning with King David,  “until Shiloh come“.  (Saul, the first King, was from the tribe of Benjamin and was rejected by God).  The king’s of the united tribes of Israel were all from the line of Judah until the dispersion.

When was this passage “until Shiloh come” referring to?  It is referring to the Messiah, according to the Latin Vulgate:

The Latin Vulgate translates the word [Shiloh] as “he … that is to be sent

Similarly in the Greek Septuagint, we find the verse referring to the Messiah:

A ruler shall not fail from Juda, nor a prince from his loins, until there come the things stored up for him; and he is the expectation of nations.

And the Syriac Vulgate refers to the “…coming of the One…to whom the Gentiles shall look forward…“:

The sceptre shall not depart from Judah, nor a lawgiver from between his feet, until the coming of the One to whom the sceptre belongs, to whom the Gentiles shall look forward…”

And finally, the Jewish Midrashim reads:

Until Shiloh comes; He to whom Kingship belongs (shelo)” — Genesis Rabbah 99:8

That this Messianic ruler would unite all peoples can be see clearly in the above references as He will be the one “…to whom the Gentiles shall look forwardhe is the expectation of nations”

And finally, consider the verse following Genesis 49:10:

Binding his foal unto the vine, and his ass’s colt unto the choice vine; he washed his garments in wine, and his clothes in the blood of grapes:“–Genesis 49:11

Which was fulfilled by Jesus when he was ready to make his triumphant entry into Jerusalem:

And when they drew nigh unto Jerusalem, and were come to
Bethphage, unto the mount of Olives, then sent Jesus two disciples,
Saying unto them, Go into the village over against you, and
straightway ye shall find an ass tied, and a colt with her: loose
[them,] and bring [them] unto me. And if any [man] say ought
unto you, ye shall say, The Lord hath need of them; and straightway he
will send them. All this was done, that it might be fulfilled
which was spoken by the prophet, saying, Tell ye the daughter of
Sion, Behold, thy King cometh unto thee, meek, and sitting upon an ass,
and a colt the foal of an ass.” — Matthew 21:1 – 5

So, Jacob, who was born while Shem (through whom Jesus would come), a son of Noah was still alive, gave prophecy of Jesus the Messiah all the way back to when the tribes of Israel were in Egypt.

Then said I, Lo, I come: in the volume of the book it is written of me” — Psalm 40:7