I love travelling by train. My last trip was from Barcelona to Milano in a hoteltrain, it was lovely. Trains in Italy are quite frequent and a good way to move around the country.
I also travelled by train in India. There're luxury trains which are amazing, comfortable, good service and clean but are mainly used by tourists. Other trains are really crowded and not so clean. Of course, first class is a bit different, but if you travel using the lowest fare, it is a bit uncomfortable but you meet the locals.
I also recommend two luxury trains in Spain, The Transcantabric (It goes along the north of Spain and stops to visit the most relevant historic sites, it includes lunch in famous restaurants) and the Al-Andalus which does the same along Andalucia.