Your on board credit is applied to your final bill. What ever is on your final bill, including gratuities, are subject to the credit. So long as you haven't already pre-paid your gratuities before you board, onboard credit can be used to pay in full or in part your onboard bill which will then include gratuities.