I'm confused - they had a guestlist and everyone else in the class but her was on it, or none of your students were on it and they decided to exclude her personally?
I think you did the right thing by allowing the rest of the class to attend, but I feel terrible for your student, especially given the push for more women in engineering.