In a large pot, bring salted water to a boil. Add the potato gnocchi and cook according to package instructions until they float to the top (usually 2-3 minutes). Drain and set aside.
In a skillet, heat the olive oil over medium heat. Add minced garlic and sauté for about 30 seconds until fragrant.
Next, add the chopped spinach to the skillet, cooking until wilted, about 2-3 minutes. Remove from heat.
In a large mixing bowl, combine the ricotta cheese, half of the mozzarella cheese, heavy cream, nutmeg, salt, and pepper. Stir in the cooked gnocchi and the spinach mixture until well coated.
Transfer the gnocchi mixture into a greased baking dish. Sprinkle the remaining mozzarella and all of the Parmesan cheese on top.
Bake in the preheated oven for 20-25 minutes, or until the cheese is bubbly and golden brown.
Remove from the oven and let it cool for a few minutes before serving. Garnish with fresh basil leaves.