Gritty texture is due to excess acid. When you're making it from cultures mozz, the acidification happens after the curds fuse, so the texture is smoother even with the lower pH. When you're using citric or tartaric, you acidify the milk directly, and even though the pH may be the same as the cultured, the mozz is very gritty.
You could have remedied the issue by adding caustic soda solution to raise the pH to ~5.9, and then making the ricotta. Adding lemon juice actually made it worse.