In gluten-free baking, xanthan gum plays the role of imitating gluten. In baking, gluten is what makes dough “doughy.” It gives the dough elasticity, as well as viscosity. It works as an emulsifier, encouraging liquids that normally don’t like one another to mix together. It works as thickener, increasing the viscosity of liquids and batters and can create a creamy texture.