Bring a large pot of salted water to a boil. Add the gnocchi and cook according to the package instructions, usually about 2-3 minutes, until they float to the surface. Once cooked, drain them in a colander and set aside.
While the gnocchi is cooking, heat 2 tablespoons of olive oil in a large skillet over medium heat. Add the minced garlic and sauté for about 1 minute, until fragrant but not browned.
Stir in the chopped sun-dried tomatoes and cook for another 2 minutes to release their flavor into the oil. Then add the fresh spinach, stirring until wilted, about 1-2 minutes.
Pour in the heavy cream, stirring continuously to combine everything. Let the mixture simmer gently for 2-3 minutes until slightly thickened.
Add the drained gnocchi to the skillet and toss to coat in the sauce. Stir in the grated Parmesan cheese, salt, black pepper, and red pepper flakes if using. Cook for an additional 1-2 minutes until the cheese melts and the gnocchi is heated through.
Plate the gnocchi while hot and enjoy!