Dear Mr. Rao,
Please refer to the Payment of Gratuity Act for the exact comprehension of the act.
As per the act an Employee is eligible for receiving gratuity only if he is separated from the organisation and prior to his separation he has been in continuous service with the same organisation for not less than 5 years.
Therefore, the criteria of retirement or otherwise is immaterial. But completion of 5 years and separation thereafter is important.
Trust you will get your answer as above.
Regards,
Sidhesh Bandodkar.