Step 1Finely chop the garlic on a cutting board. Sprinkle the garlic with a pinch of salt, then use the flat side of your knife to crush the salt into the garlic. Run your knife through the garlic and salt to chop it finer. Keep alternating these two motions until the garlic becomes a smooth paste. Scrape the garlic paste into a medium bowl and whisk in the egg yolk and lemon juice.
Step 2Place the bowl on a damp kitchen towel to keep it steady and then, while whisking constantly with one hand, slowly pour the olive oil into the bowl — drip by drip at first, then pouring in a thin, steady stream — until it forms a smooth, silky mayonnaise. Stir in the pepper and season the mayonnaise with more salt. Scrape the mayonnaise into an airtight container and refrigerate until ready to use.
Step 3Prepare a charcoal grill for direct, high-heat grilling or heat a gas grill to high. (Alternatively, heat a large cast iron skillet over high heat.) Add the patties to the grill and cook until browned and lightly charred on the bottom, about 4 minutes. Flip the patties, place sliced Gruyère on each, and continue cooking until the cheese is fully melted and an instant-read thermometer inserted through the side of the patty reaches 140 degrees for medium doneness. Using a slotted spatula, transfer the patties to a plate, tent loosely with foil, and let rest for 5 minutes.
Step 4While the burgers rest, place the split rolls or buns, cut sides down, on the grill or in the cast iron pan, and lightly toast, 1 to 2 minutes. Remove the buns from the heat and spread the insides of each with some of the mayonnaise. Place a patty in each bun and serve while hot.