Add a pot of water to the stove, covered, and turn on the heat to let it come to a boil. Preheat the oven to 420 degrees F. Pour the whole tomatoes into a bowl and, with clean hands, smoosh each tomato to break it up.
Add olive oil to an oven-safe skillet over medium heat. Add the onions and a pinch of salt. Cook until the onions begin the often, then add the garlic and cook for one minute.
Pour the tomatoes into the skillet. Add a pinch of red pepper flakes, some pepper and a pinch more salt. Stir and let simmer for 10 minutes.
Add half of the mozzarella, tearing off small pieces, along with the basil and stir. At this time, add a big pinch of salt to the boiling water along with the gnocchi. These will only have ~2 minutes to float. Once then do, use a slotted spoon to transfer them directly to the sauce, making sure to get some pasta water over also.
Stir everything together, then add the rest of the mozzarella on top. Transfer to the oven and bake for ~20-25 minutes, or until the cheese is melted and bubbly. Top with fresh basil.