Preheat oven to 350 degrees. Cook onion in butter until soft, add flour and cook for 2 minutes, whisking. Whisk in milk and cook until thick and bubbly.
Remove from heat and add 3/4 cup of cheese, stirring until melted; season with salt and pepper.
Layer half of potatoes in a baking dish and sprinkle with salt and pepper. Cover with half of sauce. Layer remaining potato slices on top of sauce and season. Top with remaining sauce and sprinkle with remaining cheese. Bake, covered, for 30 minutes or until potatoes are tender.