Place the potatoes in a large pot and fill with enough water to cover them. Bring to a boil and cook until tender enough to pierce with a fork. Drain and cool slightly, then remove the peels, and slice into 1/4 inch thick slices.
Preheat the oven to 400 degrees F (200 degrees C). Lightly grease a 9×9 inch baking dish.
Bring a large pot of lightly salted water to a boil. Add macaroni and cook until barely tender, about 6 minutes. Drain and set aside.
Melt the butter in a large skillet over medium-high heat. Add onion; cook and stir until onion starts to turn translucent. Stir in the garlic, and cook for a few more minutes. Remove from the heat and set aside.
Layer the macaroni, onions and potatoes into the prepared baking dish. Season with salt and pepper. Sprinkle the shredded Gruyere cheese over the top, and drizzle cream evenly over the entire dish.
Bake in the preheated oven until the top is golden brown, 15 to 20 minutes.