Grainy/gritty hummus can be down to several factors: if the chickpeas haven't been cooked for long enough (from dried or even canned versions), it hasn't been blended for long enough, and the chickpea skins can sometimes cause graininess too. To avoid graininess, make sure to cook your chickpeas until soft and mushy, not just al dente. Then, blend all of the other ingredients in your blender first for a minute or two before adding the chickpeas (you can even add the chickpeas in smaller batches rather than chucking them all in in one go - though I haven't found this necessary. If you're using canned chickpeas, make sure to cook these too - till soft. Often canned versions won't be quite soft enough on their own.