It's truly worth it to take your time and let the onions get deeply golden, because they take this excellent grilled cheese to the next level.
Heat the canola oil and 1 tablespoon butter in a large saute pan over medium heat. When the butter is melted, add the onions and cook, stirring occasionally, until dark brown and caramelized, about 25 minutes. Add the vinegar, sugar and 2 tablespoons water, scrapping up any dark bits that have accumulated on the bottom of the pan. Continue to cook until all the liquid has evaporated. Transfer the onions to a bowl and reserve.
Butter 1 side of each bread slice. Lay 6 slices butter-side down on a work surface. Top each with 2 slices of Gruyere, a dollop of the onions and 2 more slices of Gruyere. Top with another slice of bread, butter-side up.
Heat a cast-iron griddle over medium heat. Add the sandwiches and cook until the cheese begins to melt and the bread is golden brown, 2 to 4 minutes. Flip and continue to cook until golden brown and the cheese is melted through, 2 to 4 minutes. Cut in half and serve immediately.