Preheat oven to 180°C (356°F).
Heat olive oil over medium heat in a cast-iron skillet or stainless steel pan. Sauté onion and garlic until soft, fragrant and translucent. Add dried oregano and basil, cooking for 1-2 minutes.
If needed, add more oil, then add gnocchi. Cook, stirring occasionally, until gnocchi is lightly golden, about 3-5 minutes.
Deglaze the pan with the white wine or water, using a wooden spoon or spatula to scrape up any browned bits. Add cream and water (or stock), simmering for about 5 minutes until gnocchi is cooked.
Stir in pesto, spinach, and artichokes. The spinach will wilt from the heat. Top with the shredded gouda and bake for 15-20 minutes until cheese is melted and golden.
Serve directly from the pan.