In a medium bowl, combine the flour, xanthan gum (if using), baking powder, salt, cinnamon and nutmeg. Set aside.
In a large bowl, beat together the butter and sugars on medium speed until the creamed together and the butter looks lighter in color, about 2-3 minutes.
Blend in the pumpkin, vanilla, and egg until combined.
Then, gradually add in the flour mixture, blending until just incorporated.
Chill the dough in the refrigerator for 1 hour.
Preheat oven to 350F. Line baking sheets with parchment paper.
In a small bowl, combine granulated sugar, cinnamon, ginger and allspice and give it a stir to combine.
Using an ice cream scoop, scoop out balls of dough and roll them in the palms of your hand until their rounded.
Place the ball of dough into the bowl with sugar in it and roll it around until the dough is coated. Place on the baking sheet. Repeat until you are finished, spacing the cookie dough balls 2-3 inches apart.
With the bottom of a drinking glass, gently press down on each cookie ball so that it is slightly flattened.
Bake cookies at 350F for 10 to 12 minutes. Let stand on the baking sheet for 5 minutes and then transfer to a wire rack to finish cooling.