Yes there are Thai trains from Bangkok to Chiang Mai but no further north.
They have a official website of the "State railway of Thailand" or Thai train system that is pretty good. http://www.railway.co.th/english/index.asp
There you will find all the information you need as far as facts and costs go but here I want you to have some basic hints.
With discount airlines offering cheap flights The first class is more expensive than some special offer by airlines. As well the time difference makes me take flights now.
Since the former government leader had a "family member" who officially owned a airline the budget of the railway seems to be stretched a lot, as well as it has been used for free rides for vote collecting (buying) so is not as wonderful as it once was.
So I only recommend now second class sleepers, air conditioned cars. Take lower berths if you wish to sleep. as upper berths are smaller and the light does come in the top berth very well. Ask for berths in the middle of the car away from the toilet and the between cars doors that slam while you try to sleep or on a auto opener which is not so quiet.
Also choose a rail car not so close to the engine if possible, one for engine noise, as all cars on slower trains crash into the one before it causing a bang.. bang... bang every time they stop or start from stations along the route.
I am told the first class is a wonderful way to spend the honeymoon but I have no personal experience with that car.
Chiang Mai to Bangkok train timetable
Chiang Mai Railway Station
Charoen Muang road,
(053) 24-4795, (053) 242094, (053) 245364
|Special Express||16.30||6.40||791/881 (top/bottom)|
|Special Express||17.50||7.00||791/881 (top/bottom)|
Hualampong Railway Station www.railway.co.th
Bangkok to Chiang Mai train timetable
|Special Express||18.00||07.15||791/881 (top/bottom)|
|Special Express||19.35||09.45||791/881 (top/bottom)|
There are 20 day passes for non residents as well.