Yes, GAMs can handle categorical variables by incorporating them as factors in the model. This is typically done using dummy variables or one-hot encoding, where each level of the categorical variable is represented by a binary variable. The GAM can then model the relationship between the categorical variable and the response using smooth functions for each level of the factor.