Warm the oil and garlic. In a wide skillet or saucepan, heat the olive oil over medium. Add the sliced garlic and cook until fragrant and just turning golden at the edges, about 60–90 seconds. Don’t let it brown too much.
Build the base. Stir in the tomato paste and cook for 1 minute to caramelize it slightly.
Add the crushed tomatoes, red pepper flakes, salt, and a few twists of black pepper. If your tomatoes taste sharp, stir in the sugar.
Simmer gently. Bring the sauce to a gentle simmer and cook, uncovered, for 12–15 minutes, stirring occasionally. Tear in half the basil leaves during the last few minutes.
Taste and adjust salt and pepper.
Boil the gnocchi. Meanwhile, bring a large pot of well-salted water to a boil. Add the gnocchi and cook until they float to the surface, 2–3 minutes. Let them float for 30 seconds more to ensure they’re tender.
Save some pasta water. Before draining, scoop out 1/2 cup of the starchy cooking water and set aside.
Drain the gnocchi.
Marry pasta and sauce. Add the gnocchi directly to the simmering sauce. Toss gently to coat. If the sauce feels too thick, add a splash of the pasta water until it looks glossy and clings well.
Finish for richness. Stir in the butter (if using) until melted.
Add the remaining basil, torn by hand. Drizzle with a little extra-virgin olive oil for shine and aroma.
Serve. Plate the gnocchi and top with grated Parmesan or Pecorino. Add a few fresh basil leaves and a grind of black pepper.
Serve hot.