Bring a large pot of salted water to a boil. Add the gnocchi and cook according to package instructions, usually about 2-3 minutes or until they float to the top. Drain and set aside.
In a large skillet, heat the olive oil over medium heat. Add the minced garlic and sauté for about 1 minute, until fragrant, being careful not to burn it.
Stir in the diced tomatoes (with their juices) and sugar. Bring to a gentle simmer and cook for about 5 minutes, allowing the flavors to meld together.
Pour in the heavy cream and stir well, allowing the sauce to come to a simmer again. Season with salt, black pepper, and red pepper flakes (if using) to taste.
Reduce the heat to low, add the chopped basil leaves, and stir in the grated Parmesan cheese until melted and creamy.
Add the cooked gnocchi to the skillet, gently tossing to coat them in the creamy tomato sauce.
Allow everything to warm through for about 2-3 minutes, adjusting seasoning if necessary.
Serve immediately, garnished with additional Parmesan cheese and fresh basil if desired.
Notes
Add more red pepper flakes for extra heat if desired.