Preheat an oven to 400°F. Grease a 9-inch baking dish with butter or non-stick cooking spray.
Cut the potatoes into 1/8 inch slices. Arrange the slices, slightly overlapping, on the bottom of the baking dish and season with salt and pepper.
In a medium skillet, heat the olive oil over medium high heat. Add the onion and sauté until starting to caramelize, about 8-10 minutes. Add the heavy cream and bring the liquid to a simmer. Simmer until slightly thickened, about 5 minutes. Stir in 3/4 cup of the gruyere cheese and all of the parmesan and cook until smooth and melted. Remove the mixture from the heat, let cool slightly and stir in the crème fraîche. Season with salt and pepper.
Pour the cream mixture evenly on top of the potatoes and sprinkle the remaining 1/4 cup of Gruyere cheese evenly on top. Bake until golden brown and bubbly and the potatoes are fork tender when pierced with a knife, about 45 minutes to 1 hour. Let the gratin rest for about 15-30 minutes before serving. Garnish with thyme and serve.