First, you should review the use of the subjunctive mood. Here the subjunctive is used to express an "unreality" to the situation: basically, that she did not know about the party.
The phrase "if she knew" leaves doubt as to whether or not she knew. However, we want to express that she did NOT know. The subjunvtive does this.