The story of Gilgamesh is very distantly based on a figure who appears in ancient Sumerian king lists and thus may have been a mythologized account of one of the actual kings of Uruk. The epic itself attempts to give us a sense of the evolution of kingship and how the authority of kings evolved and was legitimated in relation to both religious beliefs and a sense of justice that almost anticipates a form of social contract theory. Thus we can read the epic as a narrative that reinforces many of the values found in the law codes of the period.
Gilgamesh at the start of the epic is a bad king and the trajectory of the epic reflects his path to becoming a better king. The first value reflected is one of hierarchical appropriateness. The king should be subservient to the gods and the people subservient to the gods and the king. Gilgamesh over the course of the epic grows to understand this and readers see that the role of the king is not to be above divine justice but to essentially enact it. What legitimates the king's rule is his commitment to justice and his relationship to the gods.
The king should defend the rights of the powerless, including the poor, widows, and orphans, using power to benefit the city rather than simply for his own pleasure. In Gilgamesh's relationship with Enkidu, we see the value of friendship. In the failed quest for immortality we see the value that humans should worship the gods but not strive to become their equals. While physical strength and power are admired, they must be tempered by wisdom, justice, and self-control.
Well, let us start this answer by remembering that the story of Gilgamesh is one that begins with Gilgamesh evincing many characteristics that make him a bad ruler. It is his tryannical tendencies that make his people pray to the gods for relief, who send Enkidu to act as Gilgamesh's foil. Their friendship and the adventures that they have together are key aspects leading to the transformation of Gilgamesh.
An examination of these adventures and the kind of qualities that Gilgamesh demonstrates identifies that the ancient Sumerians valued above all else strength and cunning in battle. The ability of Gilgamesh to defeat the giant Humbaba and then also to triumph over the Bull of Heaven, representing famine and disaster, clearly shows these qualities. However, at the same time, let us also remember the way in which Gilgamesh is shown to value friendship and his companionship with Enkidu above all else. Enkidu's death and the way that this haunts Gilgamesh shows a surprisingly human quality to this epic hero that we must not forget, and suggests very strongly that the Sumerians also highly valued close relationships and friendships.