By train[edit]
The cheapest and most scenic way of reaching Ayutthaya is by train. It regularly departs from Bangkok's Hualamphong Train Station and stops in Ayutthaya. The trip takes about 1h20min - 2.5 hrs depending on the type of service. Second-class seats (A/C) cost 245-345 baht, third-class is just 15-20 baht (!) (no reservations and seats are not guaranteed). Check time table here: [1]. (Please note that fares listed on the Thai railways site are out of date and incorrect).
Although in the past railway employees preferred not to sell 3rd-class tickets to foreigners, as of 2011 the employees were explicitly offering 3rd-class seats to western tourists as a standard option. Also note that some train stations (for instance Bang Khen) do not appear on the sites map, and that tickets may even be cheaper. If you have local friends, they may have some good advice.
The railway station is not on the island but across the river a short ferry ride away. Walk across the main road and down the small street straight ahead. Ferry boats run every few minutes and cost 5 baht. Alternatively, tuktuks are waiting in front of the station to take you into town for around 60 baht.
When taking the train, it's best to get on/off in Bang Sue. The track inside Bangkok is at-grade, and the train often got stopped because of traffic signal. Delay is expected especially during rush hour.