A completely parallel English version of the Chinese would be:
I didn't (or don't) understand the first word (or sentence) that you just said.
的 is functionally equivalent here to 'that':
the first word (or sentence) | that | you just said.
你刚说 | 的 | 第一句话
Notice that the order of the clause is reversed in Chinese and English. This is because Chinese treats "the first word" as the head of the phrase, and puts it where all heads in Chinese phrases go: on the right side. It treats 你刚说 as if it were modifying the head, and puts it where all modifiers (attributives) go in Chinese phrases: on the left side.
Notice that this is exactly parallel to how adjective - noun phrases are treated in Chinese:
the red | _ | pen
紅色 | 的 | 筆
So Chinese treats this kind of adjectival phrase in the same way that it treats relative clauses. This is very logical, since in both phrases the descriptive part and the head part get the exact same treatment.
English, on the other hand, is weirdly inconsistent, putting head first in relative clauses and head last in adjectival phrases, where it doesn't even bother to mark which is which.
In both these cases in Chinese the 的 is required. To omit it will confuse people and even if they can figure out what you mean, they will feel you have said something very odd.