Preheat the oven to 375°F.
Cook the potato gnocchi in a large pot of salted boiling water according to package instructions until they float to the surface.
While the gnocchi is cooking, heat the olive oil in a large skillet over medium heat.
Add the minced garlic to the skillet and cook until fragrant, about 1 minute.
Add the whole peeled tomatoes to the skillet, breaking them up with a wooden spoon.
Season the tomato sauce with red pepper flakes, salt, and pepper to taste.
Let the sauce simmer for 10 minutes, stirring occasionally.
Drain the cooked gnocchi and add them to the tomato sauce.
Stir to combine the gnocchi and sauce.
Add the chopped fresh basil to the skillet and stir to combine.
Transfer the gnocchi and sauce to a baking dish.
Top the gnocchi with sliced mozzarella cheese and grated Parmesan cheese.
Bake the gnocchi for 20-25 minutes, or until the cheese is melted and bubbly.
Let the gnocchi cool for a few minutes before serving.