A sandy or gritty texture in hollandaise sauce usually indicates that the butter has broken down and the milk solids have separated, or that the sauce has curdled due to overheating. This means the emulsion has failed.
Hollandaise sauce is an emulsion of egg yolks, melted butter, and lemon juice (or vinegar). The egg yolks act as an emulsifier, binding the fat (butter) and the liquid (lemon juice) together. When the sauce is heated too quickly or becomes too hot, the emulsion can break. This causes the butter to separate into its components: butterfat and milk solids. The milk solids are what give the sauce a sandy or gritty texture. Over-whisking can also contribute to the breakdown of the emulsion. The proteins in the egg yolks can over-coagulate, leading to a grainy texture. Sometimes, using butter that isn't fully clarified can also introduce more milk solids, increasing the risk of a gritty sauce.
To prevent a sandy hollandaise, use clarified butter (ghee) which has the milk solids removed. Also, use a double boiler or a very low heat setting to gently cook the sauce, whisking constantly to maintain the emulsion. If the sauce starts to separate, immediately remove it from the heat and whisk in a tablespoon of cold water to help re-emulsify it.