Heat 2 tablespoons of the oil in a 12 inch skillet over medium high heat, add the gnocchi in a single layer, and cook undisturbed 3 to 4 minutes until a golden crust forms; flip and cook 2 to 3 minutes more, then set aside.
Reduce the heat to medium, add the remaining 1 tablespoon oil, the garlic, and the anchovy if using, and cook 45 seconds, mashing the anchovy into the oil with a spoon, until it dissolves and smells savory rather than fishy.
Add the capers and olives and cook 1 minute.
Stir in the crushed tomatoes and red pepper flakes.
Simmer uncovered 8 to 10 minutes, stirring occasionally, until the sauce thickens and coats the back of a spoon.
Taste and season with pepper and only as much salt as needed; the olives and capers add plenty on their own.
Return the gnocchi to the sauce, toss gently to coat, and warm through 1 to 2 minutes.
Scatter parsley over the top and serve directly from the skillet.
Good to Know
Skip the anchovy entirely for a vegetarian version and add an extra tablespoon of capers in its place; the saltiness carries the sauce either way.