You have worked 4 years 6 months 5 days.
You should have worked 5 years of continuous service to be eligible for gratuity, where continuous service means 240 days work in a calendar year.
for last period of 6 months 5 days, you have not done continuous service of 240 days. Hence not eligible.
But if you have worked, suppose, 4 years 10 months 5 days, you would be eligible for gratuity. In this case, 10 months 5 days is beyond 240 days limit. Hence 10 months 5 days would be treated as 1 full year. Hence eligible.