The old city itself was founded in 1351 on an almost natural island about 4 kilometers (2.5 miles) wide, formed by the confluence of the Chaophraya, Lopburi and Pasak Rivers. A wall once encircled the entire island, though only a few bits of it can be seen today. U Thong, who later became King Ramathibodi I, is credited with the city's founding.
U Thong was the ruler of the kingdom of Lavo, based in what is present-day Lopburi. According to some legends, a plague struck the old capital, so the king determined to move the capital to Ayutthaya, where, surrounded by water, they thought they would be safe from pestilence, as well as invaders. It was the forces of King Ramathiboki I that laid siege to the Khmer capital near Angkor Wat, contributing to the downfall of the Khmer empire.
The city grew rich on the produce of the land, as well as by exploiting expanding trade routes between India and China. The empire grew to control most of what is now Thailand, and by the time the first Europeans arrived in the mid-17th century, Ayutthaya was a city of more than a million people -- double the population of London at the time. The city sat at the center of a network of nearly 140 kilometers of canals. This "Golden Age" of Siam came to a close after little more than 400 years when the Burmese sacked the city, setting fire to the temples, carting off the gold and leveling important buildings such as the kings palace.
While the Burmese did a lot of damage to the city, it's perhaps worth noting that the Thais did a lot more damage, when they carted off huge piles of bricks from the old city to build the new capital in Bangkok. This is why there's little more than the foundations left of the royal palace, which was mostly make of wood in any case.
What remains today are a few ruins scattered among grassy fields. The main sights are concentrated in the north-center of the island, while the modern town hugs the east coast. There are also numerous other attractions spread around the opposite side of the rivers.