Apart from some rare exceptions, agreement depends only on the grammatical gender of a noun, and not on what it means. Since gratin is a masculine noun, the personal pronoun for referring to it is il if it's the subject of a verb. See When to use the pronoun en? for some of the cases where the personal pronoun isn't the subject (in some of those cases it does matter that it's an object rather than a person).
A literal translation of “the gratin was mentioned” is le gratin a été mentionné or le gratin était mentionné. The right tense depends on the context, there isn't a simple mapping between English tenses and French tenses. *Le gratin être mentionné is an ungrammatical jumble of words, just like *gratin be mentioned in English. It may well be the case that you shouldn't use the passive voice here in French, but that too depends on the context.
Cooked as opposed to raw is cuit. Once again, the context may matter.