Gilgamesh dreams of epic journeys and dangerous challenges that reflect his real-life adventures. In his dreams—which are projected by gods to mortals as a form of communication—Gilgamesh is a not necessarily a hero, but a sojourner seeking the meaning of existence, and even the key to everlasting existence.
In actuality, Gilgamesh is a young arrogant king who has brutish ways. However, when Enkidu dies—his half-human, half-beast companion—Gilgamesh begins to question his ways and goes on a quest to seek immortality. Gilgamesh's dreams are also central to the narrative in that they influence his growth as a person. For instance, he has two major dreams: a meteor falling to earth and an axe appearing by his door. These dreams are riddles to important lessons in life and were give to him by the gods.
So in this sense, the dreams of Gilgamesh help develop his actual personality. The dreams also show him the future, including instances in which he could be killed, but he is spared by the gods. In the end, it was the heroic and orderly Enkidu who showed Gilgamesh how to be a caring and thoughtful leader to his people.