Grease a 2 litre (3½ pint) shallow ovenproof dish. Scrub and thinly slice the potatoes, then layer half into the dish.
Chop the clams roughly and scatter over the potatoes with the bacon and shallots. Arrange the remaining potato slices on top.
Beat together the cream, milk, thyme, garlic and half the Gruyère in a bowl. Season with plenty of pepper and pour over the potatoes. Cover with foil and bake in a preheated oven, 180°C (350°F), Gas Mark 4, for 45 minutes.
Stir the breadcrumbs into the melted butter until coated. Scatter over the potatoes and sprinkle with the remaining Gruyère. Return to the oven, uncovered, for a further 45–50 minutes until the potatoes are tender and the topping is golden. Serve with a green or tomato salad, if liked.