Bring a large pot of salted water to a boil over high heat. Add the pasta and cook according to package instructions, about 10 minutes. Drain, reserving 1/2 cup pasta water, and set aside.
Meanwhile, in a large saute pan, add the olive oil and shallots. Saute on low for 15 mins, adding salt about 5 minutes in. Saute until shallots become soft and caramelized.
Add garlic and saute for another 2 minutes. Then add balsamic vinegar and saute for 30 seconds, until fragrant.
To the pan of shallots, add the cooked pasta and gruyere and stir. If needed, slowly add pasta water until desired consistency is reached. Add salt and pepper, to taste.