The cause of any grainy texture of your cake is ricotta cheese. Naturally, it has a slightly grainy texture, and some brands have this more or less than others. You may not love this effect. So, to eliminate some of this graininess, try whisking the cheese before adding it to the batter or work with a different brand next time you make this recipe.