You have the right to sit down with the administration and the teacher, to start with. Ask them what happened and for an explanation. Make it clear that the grandmother has no legal right to grant permission for such things. And, again, you SAY the teacher "knew" the grandmother had no legal rights, but what you think a teacher knows and what the teacher actually does can be two different things.
As a note, I am also a public school teacher and I don't have access to information on who has legal custody or the right to sign or not to sign a permission slip in the classroom. If I was relying on a permission slip I am not likely to send home confirmation requests and coded affidavits. I check to see if it is turned in and if it appears to be a legitimate signature and not written, "Child's Mom." Most of these slips also have further contact info and even insurance information on them as well. Of course, that depends on what the activity is. If grandma violated a court order of some kind, you can take action against her. If you make it loud and clear to the school that grandma can't sign these things, then I am sure the school will be more than willing to let your child stay at school when future trips come up and your child has not gotten the permission slip signed.
So, speak to the teacher and the administration so that they know that if you have not personally signed a permission slip, your child stays at school.