Preheat the oven to 425°F.
Prep the tomatoes: On a rimmed baking sheet, stir together the tomatoes, onion, garlic, oil, salt, and pepper. Spread into a single layer and tuck the sliced garlic under the other ingredients to prevent it from burning.
Roast the tomatoes: Roast until the tomatoes have burst, the onion is translucent, and the garlic is golden, about 20 minutes.
Add the gnocchi and corn: With the back of a spatula, press any still-firm tomatoes until they pop. Add the gnocchi, corn, and corn “juice” to the baking sheet. Stir until the ingredients are coated thoroughly, scraping loose any tomato bits stuck to the pan and breaking up any gnocchi that are stuck together. Spread into a single layer and return to the oven. Bake until the liquid is bubbling and slightly thickened and the gnocchi has browned slightly on the side touching the baking sheet, about 10 minutes.
Finish and serve: Add the butter to the sheet pan. When melted, and add the chopped herbs, stir everything until incorporated, and serve. Store leftovers in an airtight container in the refrigerator for up to 3 days. Love the recipe? Leave us stars and a comment below!
