Baby artichoke gratin

Baby artichoke gratin (Ricardo DeAratanha / Los Angeles Times)

Aromatic vegetables suspended in a rich sauce, maybe a little melted cheese, all of it hidden under a crisp golden brown crust. Behold the glory that is the gratin.

One of the oldest dishes in the comfort food playbook, the gratin is a celebration of lush creaminess and crisp crust that is often based on the simplest of ingredients. Its poster child, the gratin dauphinois, is made from nothing more than potatoes and cream. Sliced potatoes are layered with cream or milk in a shallow baking dish and baked until the filling is thickened and bubbly and the top of the dish is toasted to a rich brown.

That may be classic, but gratin isn't a restrictive dish. Such goodness should never be limited.

Almost any food can be gratinéed. Focus the gratin on one ingredient (say, asparagus or crab) for a simple side or appetizer dish, or pair ingredients, constructing the gratin to make a perfect one-dish meal. You could even build the gratin around pasta. (Baked macaroni and cheese, anyone?) Take your inspiration from what you might find in the market, or whatever leftovers might be in the fridge.

A versatile dish, the gratin can be refined or rustic, combining just a few ingredients or a complex harmony of flavors. But it's simple at heart. Perhaps the only restriction is that the final dish have some sort of crust, whether it's the filling itself that toasts in the oven, or a formal topping that is added, such as bread crumbs or cheese, or maybe nuts. Assemble the gratin in a wide, shallow ovenproof dish so there is enough surface area for the crust to form, and it's easy going from there.

Flour-thickened gratin

A potato gratin owes its creaminess to the natural starch from the potatoes. Absent a main ingredient with a lot of starch, flour is a great choice as a thickener.

Start with a roux, then build the sauce with cream, broth or another liquid. The only trick with a flour-based sauce is that it will need time to cook so the raw flavor of the flour dissipates. This can be done on the stove or in the gratin dish.

Fully cooked, a flour-based filling has a wonderful depth of flavor, not necessarily "heavy" but certainly with a sense of substance. Counter that savory richness with bright notes to balance the dish: a little vinegar or lemon juice, maybe a bitter leafy green or vegetable, some chopped fresh herbs added toward the end of cooking.

Cheese can also work magic. Gruyère is the classic cheese for gratins, but other options work just as well. Melted into the sauce, a fresh goat cheese or sharp cheddar can brighten the overall dish with its light acidity. Or crumble bits of blue cheese into the dish as the gratin is assembled for baking.

Because they have such substance, flour-based gratins are perfect candidates for one-dish-meals. Combine a few ingredients to build the dish. Take grilled chicken or leftover steak, crumbled Italian sausage or shrimp and pair them with a vegetable or two before assembling. Then top the dish with a little grated cheese or coarse bread crumbs tossed in a little butter and bake away.

Egg-thickened gratin

Not all gratins need an extended baking time before they're ready. Sometimes a quick trip under the broiler is all that's necessary.

When based on a sauce thickened with eggs, gratins take on a lighter overall texture, much more free-form in structure. They can be savory or sweet. Custard is a classic, or use a hollandaise or zabaglione. Spoon the sauce over the dish shortly before serving. A minute or two under the broiler is all these sauces need for color and a delicate crust — any more than that and the sauce could break. Mayonnaise can also work as a filling — flavor it with herbs, cheese or garlic. (Think of the scallop "dynamite" dish you might order in a sushi bar — also a kind of gratin, the mayonnaise flavored with fish roe and browned in a toaster oven.)

One trick with egg-based sauces is to lighten them with a little whipped cream. Not only does the whipped cream lighten the texture of the sauce, it also can help stabilize the sauce, lending more structure so it won't break when it goes under the broiler.

Spoon the sauce over tender blanched vegetables or diced fresh fruit. Ladle it over lettuce or greens. In just a couple of minutes, the finished dish will be ready to serve.

Fresh-cheese gratin

Perhaps the simplest gratin of all is made with little more than a dollop of fresh cheese or ricotta, or a fermented cream in the form of mascarpone, crème fraîche, sour cream and even yogurt.

As with the egg-based sauces, cheese and cream-based fillings will brown quickly under the broiler, taking no more than a minute or two. Watch carefully that the cheese does not overcook and separate. One good trick is to allow the cheese or cream to sit out at room temperature to warm slightly before using so it browns more quickly under the broiler, making it less likely the cheese will break down under extended heat. A little bit of a quick-thickening starch such as cornstarch can also stabilize the gratin.

Flavor the cheese with fresh herbs, maybe a touch of spice. Spoon it over caramelized onions and garlic for a layered dip. Spread it over chorizo and toasted bread crumbs as an appetizer, or gratinée chicken breasts or a grilled pork chop for the main course.

Or sweeten the cheese or cream with a touch of sugar, honey or maple syrup, and add a little lemon or orange zest. Bump up the flavor with a hint of liqueur. Dollop the cheese or cream over fresh-cut fruit or macerated berries and crumbled cookies.

noelle.carter@latimes.com