In a large pot of salted boiling water, cook the gnocchi according to package instructions until they float to the surface (about 2-3 minutes). Drain and set aside.
In a large mixing bowl, combine the halved cherry tomatoes, fresh spinach, minced garlic, dried oregano, dried basil, and olive oil. Season with salt and pepper to taste.
Gently fold the cooked gnocchi into the tomato and spinach mixture until combined.
In a baking dish, spread half of the gnocchi mixture on the bottom. Dollop half of the ricotta cheese across the surface.
Add a layer of shredded mozzarella cheese over the ricotta. Repeat the process with the remaining gnocchi, ricotta, and then top with the rest of the mozzarella and Parmesan cheese.
Cover the baking dish with aluminum foil and bake in the preheated oven for 20 minutes.
After 20 minutes, remove the foil and bake for an additional 10 minutes, or until the cheese is bubbly and golden brown.
Remove from the oven, let it cool for a couple of minutes, and garnish with fresh basil leaves if desired before serving.