By about 2250 BC, Sumerians had numerous gods, each personifying one or the other elements of nature. At the beginning, each city had its own god. With various powers being attributed to each god, eventually they were organized into a certain hierarchy. This must have taken years, since people are reluctant to consider their god inferior (lower in hierarchy) to other gods. It could have been that in a war, the winning sides gods would have risen higher.

At the top of the hierarchy, were three great male gods, whose roles were not easy to disentangle, Anu, Enlil and Enki. Anu was the father of gods. Enlil was at first the most prominent; he was ‘Lord Air’, without whom nothing could be done. Enki, god of wisdom and of sweet waters that literally meant life to Sumer, was a teacher and life-giver, who maintained the order Enlil had shaped.

Wikipedia has a slightly different information about this here. Significant details are available at this sumer-faq.