Slice the eggplant in thin slices of about 1/8". If the eggplant is large, cut the slices in half or quarters so that they will be about the same size as the zucchini and tomato slices. Place the eggplant slices in a strainer and sprinkle each layer with salt. Let it sweat while you prepare the rest.
In a large pan, saute the onion in 1 tbsp olive oil on medium high heat until it starts to brown. Add a dash of salt and pepper, and set aside
Slice the clove of garlic in half and rub the inside of your baking dish with it.
Preheat oven to 350 deg F
Slice the tomato and remove the seeds. Slice the zucchini. All slices should be about 1/8" thick.
Place the onion at the bottom of the dish.
Rince the eggplant briefly and under cold water and dry it thoroughly.
Arrange the vegetables slices on top of the onion, alternating between eggplant, tomato and zucchini, until your dish is full.
Drizzle 2 tbsp olive oil over the vegetables, season with salt and pepper. Top with Mozzarella and Parmesan.
Place in the oven. After 45 min, check the gratin to make sure it doesn't brown too fast. If needed, cover with aluminium foil. Continue baking another 15 minutes until the vegetables look nice and soft and the cheese is lightly brown. Serve warm.