This gratin is really pretty and a great light vegetable side dish. It works equally well in either a round or square baking dish.
Preheat oven to 450 degrees Fahrenheit. Line a baking sheet with parchment paper and set aside.
Cut eggplant into half-inch-thick slices. Place on the prepared baking sheet.
Drizzle with three tablespoons oil (or spray with cooking spray, as I do) and sprinkle with half a teaspoon salt.
Roast eggplant until lightly browned, about 25 minutes. Set aside to cool, leaving the oven on to bake the assembled dish.
Meanwhile, in a heavy skillet, heat two tablespoons oil over medium heat.
Add onions, season with salt and pepper, and sauté, stirring frequently, until onions are limp and golden, about 20 minutes.
Add garlic and sauté two minutes longer.
Spread onions over the bottom of a two-quart glass or ceramic baking dish.
Starting at one end of the dish, lay a row of overlapping tomato slices across the width of the dish.
Next, lay a row of eggplant slices over the tomatoes, overlapping about two-thirds of them.
Continue alternating rows of tomatoes and eggplant, pushing back the slices as needed to make space. If you are using a round dish, lay out alternating tomato slices and eggplant slices, as shown in the image.
Sprinkle with half a teaspoon of salt and half a teaspoon of pepper, and drizzle with two tablespoons oil.
In a small bowl, mix the remaining tablespoon of oil with bread crumbs and pine nuts. Sprinkle over the entire dish.
Reduce the oven temperature to 375 degrees Fahrenheit. Bake gratin 65 to 75 minutes, until well browned and the juices have bubbled for a while.
Let cool 20 minutes before serving.