Heat the oil in a saucepan and cook the onion on a low heat with some salt for around 10 mins until softened. Add in the tomatoes, tomato purée and caster sugar and bring to a simmer. Cook uncovered, for 30 mins until reduced and thick, making sure to stir regularly. Transfer to a blender or blitz the sauce with a hand blender until smooth. Taste and season as required and stir in the basil. Set aside to cool.
Mix together the flour, sugar, baking powder, salt and xanthan gum in a mixing bowl. Pour in 250ml warm water and the olive oil into a well in the centre of the mixture. Quickly combine the ingredients to create a thick, paste-like dough. Add a small amount of warm water if the dough feels dry. Put the dough in a bowl, cover with cling film and put in the fridge for no more than 24 hours before using. Lightly flour two baking/pizza trays. Cut the dough into two pieces and flatten into thin rounds, roughly the size of a dinner plate. Add to the baking/pizza trays.
Top the pizza bases with the sauce and mozzarella. Place the baking/pizza trays in the pre heated oven and cook for 8 -10 mins until crisp around the edges.