Cook the gnocchi according to the instructions on the packet, then drain and set aside.
Heat the olive oil over a high heat and sauté the garlic and onion until soft. Add in the chopped tomatoes and chilli flakes and bring the sauce to the boil.
Lower the heat and cook at a steady simmer for 15 minutes until it has reduced. Add in the sugar and season with sea salt and ground black pepper.
Preheat the oven to 200°C/Gas Mark 6. Tumble the gnocchi into the pan and stir through with the tomato sauce until each piece is nicely coated.
Pour into a highsided baking dish (9in x 9in) and top with the mozzarella slices and torn basil leaves. Place in the oven for 25-30 minutes or until the top is nicely golden brown and bubbling.
Serve straight away in deep bowls with a little grated Parmesan.