Why is my cheese sauce gritty?
Could be an unfinished roux (the butter, flour mixture). But most likely it's because the cheese was heated too quickly or too much, causing the protein to clump up.

Suggestions:


Melt with less heat
Use a double boiler (to reduce hot spots within the pan)
Toss the shredded cheddar with cornstarch first (starch helps reduce clumping)
Add cheese in smaller batches (easier to maintain correct heat level and stir cheese in)