My understanding is that as these are two separate flights, you will need to go through immigration to claim your bags and check back in.
As your final destination is Greece, I assume you have a valid Schengen visa. If that is the case you can apply for a Turkish e-visa.
India: Diplomatic passport holders are exempt from visa for their
travels to Turkey up to 90 days. Ordinary, Special and Service
passport holders are required to have visa to enter Turkey. Ordinary,
Special and Service passport holders with a valid Schengen members or
USA, UK, Ireland visa or residence permit may get their single entry
e-Visas valid for one month via the website www.evisa.gov.tr, provided
that they meet certain conditions.
That said, the Turkish MFA website does recommend applying for an e-visa at least 48 hours before departure.
You can apply for your e-Visa any time before your travel. However,
you are advised to create an e-Visa application at least 48 hours
before your departure.