For details refer section 2A of the Payment of Gratuity Act
Eligibility: The minimum service period that will entitle you for gratuity is 5 years of continuous service. Continuous service is defined as " period of uninterrupted service, including service which may be interrupted on account of sickness, accident, leave, absence from duty without leave, lay-off, strike or a lock-out or cessation of work not due to any fault of the employee" .
Further, in any calendar year, 240 days of service may be considered as having worked for one year. All holidays, weekly off /Saturday/sunday/leave with wages etc are counted as working days for the purpose of calculation of gratuity. There is a Madras high Court judgment stating that 4 years and 240 days of service will make you entitled for gratuity. 240 days= 8 months.
Thus an employee is entitled for gratuity if if she satisfy 3 points
1. She has 4.8 years of service which is uninterrupted /continuous (i.e she didnt resign / otherwise dissociate with the company in between)
2) She was not terminated for any reason including fraud moral turpitude etc which will make her in eligible to claim gratuity.
hope above clarifies.