I started the process of forgiving my mother. As I went on this journey, I realized that she was treated very badly by my grandmother, who passed away before I was born. Should I also forgive my grandmother, even though I never met her?
Yes, you can forgive your grandmother. This is what the philosopher, Trudy Govier, calls secondary forgiveness. Even though your grandmother was not directly unjust to you, she was indirectly unjust to you because of what she did to your mother.
You might want to read this essay from Psychology Today: Can You Forgive a Person Who Has Died?