1. Caramelized Onions: Adjust oven rack to middle position and heat oven to 350 F. Melt butter in large nonstick skillet over medium-high heat. Add onions and 1 teaspoon salt and cook until just beginning to brown, about 5 minutes. Stir in brown sugar and cook, stirring frequently, until onions are golden brown, about 5 minutes. Add 1/3 cup broth and cook until softened and deep golden brown and sticky, about 5 minutes. Transfer caramelized onions to medium bowl.
2. Deglaze Pan: Bring remaining broth, wine, cream and remaining salt to boil in now-empty skillet, scraping up any browned bits. Off heat, stir in vinegar; cover and keep warm.
3. Assemble Gratin: Shingle half of potatoes in 3-quart baking dish; sprinkle with 1 teaspoon thyme and 1/2 teaspoon pepper. Spread caramelized onions over potatoes and top with remaining potatoes, remaining thyme and remaining pepper. Pour broth mixture over potatoes.
4. Add Cheese and Serve: Bake until bubbling around edges, about 30 minutes. Top with Gruyere and bake until gratin is golden brown and fork inserted into center meets little resistance, 30 to 40 minutes. Let cool 15 minutes. Serve.
5. Make Ahead: Caramelized onions and sauce can be refrigerated in separate airtight containers for 1 day. To finish, microwave onions and sauce separately for 30 seconds. Proceed to step 3, Assemble Gratin.