Set your oven to 350°F. Peel the Yukon Gold potatoes (or leave the skin on if organic and well-scrubbed), then use a mandoline to slice them into thin, ⅛-inch pieces. If you don’t have a mandoline, slice as thinly as possible with a sharp knife.
In a skillet, arrange an even layer of potato slices, covering the bottom of the skillet. Pour 1 cup of the cream over the layer, then sprinkle with black pepper, minced onion, minced garlic, salt, and thyme.
Repeat the layering process two to three more times, depending on the depth of your skillet, until all the potatoes are used. Pour cream over each layer and season it with black pepper, garlic, onion, salt, and thyme.
Place the cast iron skillet in the oven and bake for 55-60 minutes or until the potatoes are fork tender. The top layer should start to turn golden brown.
Remove the skillet from the oven and set it to broil. Sprinkle the grated Gruyère cheese evenly over the potatoes. Return the skillet to the oven and broil for 3 to 5 minutes, or until the cheese is melted and golden brown. Watch carefully to avoid burning.
Let the scalloped potatoes rest before serving. This resting time allows the cream to set, giving a perfectly creamy consistency.