Dice the potatoes and put them in a pan of boiling water. Cook them for 10 minutes, or until cooked through. Drain and mash the potatoes.
Meanwhile, in a separate pan, blanch the spinach in a little boiling water for 1-2 minutes. Drain and shred the leaves.
Transfer the potato to a floured cutting board. Make a well in the center. Add the egg yolk, olive oil, spinach, and a little of the flour. Quickly mix the ingredients into the potato, adding more flour as you go, until you have a firm dough. Divide the mixture into very small dumplings.
Put the gnocchi in a pan of boiling salted water and cook for about 5 minutes, or until they rise to the surface.
Meanwhile, make the sauce. Put the oil, shallots, garlic, sieved tomatoes, and sugar into a pan and cook over low heat for 10-15 minutes, or until the sauce has thickened.
Use a slotted spoon to drain the gnocchi, then transfer to warm serving dishes. Spoon the sauce over the gnocchi and garnish with the fresh spinach leaves.