In the Merethic Era, when Ysgramor first set foot on Tamriel, his people brought with them a faith that worshipped animal gods. Certain scholars believe these primitive people actually worshipped the divines as we know them, just in the form of these totem animals. They deified the hawk, wolf, snake, moth, owl, whale, bear, fox, and the dragon. Every now and then you can stumble across the broken stone totems in the farther reaches of Skyrim.
Foremost among all animals was the dragon. In the ancient nordic tongue it was drah-gkon. Occasionally the term dov-rha is used, but the language or derivation of that is not known. Using either name was forbidden to all except the dragon priests. Grand temples were built to honor the dragons and appease them. Many of them survive today as ancient ruins haunted by draugr and undead dragon priests.
Dragons, being dragons, embraced their role as god-kings over men. After all, were they not fashioned in Akatosh's own image? Were they not superior in every way to the hordes of small, soft creatures that worshipped them? For dragons, power equals truth. They had the power, so therefore it must be truth. Dragons granted small amounts of power to the dragon priests in exchange for absolute obedience. In turn, the dragon priests ruled men as equals to the kings. Dragons, of course, could not be bothered with actually ruling.
In Atmora, where Ysgramor and his people came from, the dragon priests demanded tribute and set down laws and codes of living that kept peace between dragons and men. In Tamriel, they were not nearly as benevolent. It's unclear if this was due to an ambitious dragon priest, or a particular dragon, or a series of weak kings. Whatever the cause, the dragon priests began to rule with an iron fist, making virtual slaves of the rest of the population.
When the populace rebelled, the dragon priests retaliated. When the dragon priests could not collect the tribute or control the masses, the dragons' response was swift and brutal. So it was the Dragon War began.
At first, men died by the thousands. The ancient texts reveal that a few dragons took the side of men. Why they did this is not known. The priests of the Nine Divines claim it was Akatosh himself that intervened. From these dragons men learned magics to use against dragons. The tide began to turn and dragons began to die too.
The war was long and bloody. The dragon priests were overthrown and dragons were slaughtered in large numbers. The surviving dragons scattered, choosing to live in remote places away from men. The dragon cult itself adapted and survived. They built the dragon mounds, entombing the remains of dragons that fell in the war. They believed that one day the dragons would rise again and reward the faithful.