Cut the butter into small (about ¾-inch or 1.9 cm) cubes. Wrap it in plastic wrap and freeze it until frozen solid, at least 30 minutes. Place the flour, xanthan gum if using, salt, and baking powder in a resealable gallon-size freezer bag and freeze for at least 30 minutes.
Place the flour mixture in a food processor with the metal blade and process for a few seconds to combine. (Depending on the size of your food processor, you may need to make the recipe in two batches if you decide to double it.) Set the plastic bag aside.
Cut the cream cheese into 3 or 4 pieces and add it to the flour. Process for about 20 seconds or until the mixture resembles coarse meal. Add the frozen butter cubes and pulse until none of the butter is larger than the size of a pea. (Toss with a fork to see it better.) Remove the cover and add the water. Pulse until most of the butter is reduced to the size of small peas. The mixture will be in particles and will not hold together. Spoon it into the plastic bag. (If you double the recipe for a double-crust pie, it is easiest to divide the mixture in half at this point.) Holding the bag closed with one hand, knead the mixture by alternately pressing it, from the outside of the bag, with the knuckles and heels of your hands until the mixture holds together in one piece.
Wrap the dough with plastic wrap, flatten it into a disc (or discs) and refrigerate for at least 45 minutes, preferably overnight.
Dough keeps, refrigerated, for 4 days, or up to 3 months if frozen.