Dear Srinivasa Raghavan,
I'm quite unable to understand your question. When you are still in the services of the same organization, how does the question arise about your gratuity?
First and foremost, your organization should be an establishment covered by the Payment of Gratuity Act, 1972.
Second, there should be termination of your employment due to any reason other than dismissal on account of the misconduct of moral turpitude or riotous behavior during the course of employment and a notice for forfeiture of your gratuity should have been issued by the employer.
Third and the most important, you ought to have completed not less than 5 years of continuous service in the same establishment on the date of your termination.
By the by, do you intend to resign your job?