I don't know precisely how long it would take, but suffice it to say extremely long. Note that there is no international train travel in or out of Greece. To get to Venice you would likely connect through Trieste and Zagreb, traveling through Croatia, Serbia and Bulgaria if there are trains available for that route (I have no experience with trains in those countries).
- If your point is to travel by train then certainly look more into it (I would search train travel in the countries I mentioned). This website has more information on train travel in Turkey.
- If your point is just to get from Istanbul to Italy, I would fly. Pegasus is a Turkish budget airline, but very nice (much better quality than Ryanair etc). You can fly from Istanbul to Milan for very cheap ($89 on one random day that I plugged in). From there you can take the train to Venice or the Dolomites.