Adding cheese to a bubbling mixture will cause the cheese to break down. The emulsifiers and coagulants break down when heated thus causing a gritty texture.
If the cheddar beer cheese is too thin, you can thicken the beer cheese with an extra tablespoon of flour or cornstarch. Add flour or cornstarch to a separate bowl and mix with 1/4 cup of the thin beer cheese sauce. Slowly add the new thick sauce back in to the beer cheese recipe.