In a large saucepan, heat the olive oil and sauté the garlic.
Add the tomatoes and the basil.
Season with salt and pepper, then cover and let simmer over low heat for 20 minutes.
In a large pot, bring salted water to boil, then add the gnocchi and cook for 2 to 3 minutes until they come to the surface, then drain.
Spread half of the sauce evenly over the bottom of an oven-safe dish.
Add the gnocchi and top with remaining sauce.
Sprinkle generously with mozzarella and bake for 10 minutes.