"can payment of gratuity be denied as there is a clause in law gratuity can only be forfeited only to the extent of loss to the department. "
You have misunderstood.
In case of dismissal the gratuity is admissibel at all irrespectivbe of the loss caused to the govt.. If it was a case of merely recovery of loss due to negligence then the penalty to that effect could have been picked up from Rule 11 of CCS(CC&A) Rules.
You may see the chargesheet the allegation in all propbability will be lack of integrity in violation of rule 3(1)(i) of CCS(Conduct) rules.(kindly refer back if this is not so)