Place ricotta, egg, grated Parmesan, Kosher salt, and black pepper in a large bowl, then stir until well mixed. Add all-purpose flour, then fold with a rubber spatula until the dough just comes together. Lightly flour a work surface. Knead gently with your hands to form a mostly smooth ball.
Line a baking sheet with parchment paper, then dust liberally with flour. Using a knife or a bench scraper, cut the gnocchi dough into equal pieces. It’s more manageable this way. Roll each piece into a log. Use a knife or bench scraper to cut each rope into ¾-inch pieces.
Bring a large pot of water to a rapid boil, then season generously with Kosher salt. Meanwhile, make the sauce.
Melt unsalted butter over medium-high heat, then add shucked corn and tomatoes. Season with Kosher salt, then cook, stirring occasionally, until the corn is lightly browned and the tomatoes begin to burst. Add chopped garlic, then cook.
Carefully add gnocchi to the boiling water, then cook until they float to the top, about 2 minutes. Using a slotted spoon or spider, carefully transfer the gnocchi to the sauce. Reserve the cooking water.
Raise the heat to medium-high, then cook the gnocchi in the sauce. Serve in individual bowls with the sauce spooned on top along with additional grated Parmesan, fresh basil leaves, a generous pinch of flaky sea salt, and lots of freshly ground black pepper.