I think those two sites are too far from Istanbul for a day-trip (assuming you're not overnighting). If you go with a tour, it will be one very, very long day. Gallipoli is over 4 hours one-way, and maybe even longer. Troy isn't much closer distance-wise, and would also be a very long day trip with most time spent in transit.
I think Princes Islands to the south of Istanbul are a great day trip and a better use of your time, or even exploring parts of Istanbul off-the-tourist-track (there are huge areas of Istanbul where tourists don't venture). The Princes Islands are easily reached via ferry, which is also really inexpensive. I stopped off at two islands, spending most of my time in Büyükada, the largest island. It was a great experience, and very relaxing.
https://www.theistanbulinsider.com/why-and-how-should-you-visit-the-princes-islands-in-istanbul/
https://turkeytravelplanner.com/go/Istanbul/Sights/adalar/trans.html