Hello,
Can anybody tell me if there are trains that can take me from Athens to Vienna?
See here: http://www.seat61.com/international-trains/trains-from-Vienna.htm#Vienna-Athens
General information about getting to Greece by train is here: www.seat61.com/Greece.htm
This site (The Man in Seat 61) is the best site for train travel info on the internet.
Train between the two will run about 20 hours or maybe more. You can fly much faster and maybe cheaper. Aegean flies direct between the two in 2-1/2 hours (actual flight time, more for getting to/from airport and checking in, etc) for as little as $50 if you can purchase well ahead of time.
Olympic Air just announced some VERY cheap fares for the upcoming season if you buy your tickets before April 1. Check their website.
If you're talking about all train (instead of an overnight ferry to Italy), then DB train schedules currently show just the Thessaloniki-Vienna portion taking 30 hours, plus about 5 hours more from Athens to Thessaloniki. The recommendation on Rick's Greece rail page is to fly; see also www.skyscanner.com.