Heat oven to 180C/160C fan/gas 4. Heat 11 /2 tbsp of olive oil in a frying pan and cook the aubergines in batches, browning on both sides, then lower the heat and cook until they are soft. You will need to add more olive oil as you cook, but try not to add too much. (Roast the aubergines if you prefer – brush them with olive oil, place on baking sheets and cook for about 15 mins. I just like the texture better if they are fried for this.) Season them while they’re cooking. As each batch is ready, remove from the pan and lay them on a double layer of kitchen paper.
Heat another 1 tbsp of oil in the pan and add the onions. Cook over a medium heat until softening, about 10-12 mins, then add the garlic and cook for another few mins.
Slice the potatoes very, very finely. It’s best to do this on a mandolin if you have one – it takes more work (and a lot more time) to cut them with a knife.
Brush the bottom of a gratin dish with olive oil, and arrange the vegetables in layers. Start with half the potatoes, then half the aubergine, onions and tomatoes. Sprinkle the thyme, lemon zest, goat’s cheese, olives and seasoning, along with little drizzles of olive oil on the layers as you go. Add another layer of aubergine, onions and tomatoes, again adding the other ingredients as you go. Finish with the rest of the potatoes, arranging them neatly on top. Brush with olive oil and bake for 45 mins. The gratin should be soft, the potatoes tender and the top golden.