Freeze the butter so that it will not melt while you are working with it.
To a food processor add the four, sugar, salt, and xanthan gum.
Slice the butter into chunks and slowly add them to the food processor while pulsing the blade. The butter will not completely into the dough.
Pour the crumbly mixture into a bowl and slowly add in the cold water. Mix the dough in the bowl until the water is absorbed and then turn the mixture out on to a floured surface. The dough will barely come together, but you want to kneed it until it holds it's shape. Slowly add more water if the dough is too dry.
Using cling wrap, fold the dough up and shape it into a rough square. Place in the fridge for 2 hours to let the dough fully hydrate.
Take the dough out of the fridge and roll it out into a rough 8x8 square. Fold the dough into thirds and roll it out again. This does not have to be perfect, and if the dough cracks it is okay. Repeat the folding process again in the other direction.
Wrap the dough in cling wrap again and refrigerate for about 20 minutes so that any butter that melted can re solidify.