Heat the oven to 350 degrees. Oil a 2-3 quart gratin dish.
If the bread is soft, toast it. Rub all of the bread, both sides, with the cut clove of garlic. Tear the bread into chunks and put a layer in the bottom of the gratin. Top with tomato slices and season them with salt, pepper and thyme. If there is any garlic left mince that and sprinkle it over the tomatoes too.
Then spread about a third of each of the cheeses over the tomatoes.
Continue with one or two more layers, ending with cheese on top.
Beat together the eggs, milk, salt and pepper and pour it over all.
Bake for 40 minutes until puffed and brown. Serve warm.