Peel the potatoes and slice them thin using a mandolin. Aim for 2-3 mm (1/8", no thicker)
Peel the onions and cut them in half. Now slice each half making thin slices.
Place the potatoes in a bowl and add the salt and garlic and stir so it is evenly coated.
Start layering the potatoes in a baking dish. Add some cream, onions, then repeat, until you've used up all the potatoes and cream and onion.
Sprinkle the parmesan evenly on the surface and place the baking dish in the oven.
Let it cook for 30 minutes. Time depends on how thick the gratin is. Check with a potato stick. The top surface should have a golden brown crust, and the middle should be soft and gooey.