In a large skillet, heat olive oil over medium heat. Add minced garlic and sauté for about 1 minute until fragrant.
Pour in the canned diced tomatoes, and add the dried oregano, dried basil, salt, and pepper. Stir everything together and let it simmer for about 5 minutes.
In a large baking dish, combine the cooked gnocchi with the tomato sauce. Stir until the gnocchi are well coated.
Sprinkle the shredded mozzarella and grated Parmesan cheese over the top of the gnocchi mixture.
Place the baking dish in the preheated oven and bake for about 20 minutes, or until the cheese is bubbly and golden brown.
Once done, remove the dish from the oven and let it cool for a couple of minutes.
Garnish with fresh basil leaves if desired before serving.