Cook the grits according to the package instructions, adding the salt with the water. Turn off the heat just before the grits are done.
Preheat the oven to 350 degrees F.
In a small bowl, whisk together the eggs. To temper the eggs before adding them to the hot grits, throw a couple of spoonfuls of the hot grits into the eggs. Begin stirring immediately and continue stirring until the mixture is well combined.
Pour the egg mixture into the grits. Stir constantly to incorporate the eggs into the grits. Add the butter and stir until melted. Next, add the cheese and stir until melted. Add the cayenne and garlic and stir well to combine. Taste and adjust the seasonings, adding more salt or cayenne if necessary. You could also add more cheese if you think that will bring happiness to your life, but keep in mind that some cheeses increase the salt content more than others.
Butter a 9-by-13-inch baking dish and pour the grits into the dish. Bake until the grits are hot and bubbly, 30 to 35 minutes. Let stand for 10 minutes before serving. The grits will become firmer as they cool.