Preheat the oven to 180°C and grease a 24cm x 6cm square baking dish.
Using a large saucepan with a solid base, heat the butter over medium heat until melted. Sprinkle in the flour and heat for a further 2 minutes, stirring continuously until well combined with the butter. Remove the pan from the heat.
Stir the milk into the roux a little at a time, until well mixed. Return the saucepan to the heat and cook on high until the mixture comes to a boil, stirring continuously. If necessary, use a whisk to remove any lumps. Gradually stir in 1 1/2 cups of the grated cheese and mix well.
Layer a third of the sliced potatoes in the greased baking dish, allowing them to overlap a little. Season with salt and pepper. Ladle two-thirds of the cheese sauce evenly over the potatoes. Top with the leftover grated cheese and bake for 1 hour or until the potatoes are softened and the cheese is golden. If the cheese starts to go too brown, remove the dish from the heat, cover with foil and return to the oven.