Preheat your oven to 400℉/204℃.
Prep & clean the leeks: Trim off the hairy bottom of each leek, but make sure to not cut off too much. You preferably still want the leaves of the leek to attach to the base of the stem. Then cut off the dark green tops so that they are roughly 6 inches in length. It’s ok if you still have a little of the dark green leaves still attached but you should be left with mostly the white and light green parts of the leeks. Then rinse the insides of each leek by running them under cold water to remove any dirt and debris. Set these aside on paper towels to dry.
Arrange the leeks: Get out a 9×13 casserole dish and place the leeks inside it. Drizzle on all of the olive oil and sprinkle the salt and pepper over the leeks. Use your hands to gently toss the leeks so that they are all coated in the oil, salt, and pepper. Finally, arrange the leeks in an even layer with the cut side down.
Bake the leeks: Place the leeks in your heated oven and let them bake for 20 minutes. Then take the leeks out of the oven, flip them over so that the cut side is facing up, and sprinkle them with the shredded gruyere cheese. Return this to your oven and let them finish baking until the cheese is golden brown and the leeks are fork tender. This should be roughly 7 to 10 minutes.
Serve the gruyere roasted leeks and enjoy!