The given sentence is in the active voice, as the subject 'Who' performs an action 'gave' against the object 'you' in the interrogative.
If this sentence is changed to passive voice, then the subject is also changed, in order to retain the meaning of the sentence.
So,
the object takes the place of the subject and vice versa and the word
'by' is introduced as now the subject receives the action by the object.
The verb form of the sentence is also changed from active form to
passive.
'Subject (Who) + verb (gave) + indirect object (you) + direct object (permission) + infinitive phrase (to enter)' changes to:
'By + subject (whom) + auxiliary verb (were) + indirect object (you) + main verb (given) + direct object (permission) + infinitive phrase (to enter)'
The
passive form of 'gave' in the simple past tense is 'was/were given'.
This can be seen in option A, hence it's the right answer.
Option B: The correct verb form for the second person 'you' is 'were' and not 'was'.
Option C: 'Were' will come before the object 'you' because the sentence is interrogative, hence the structure will differ as compared to a declarative sentence.
Option D: Similarly in this, the object 'you' comes before the main verb 'given'.
Hence options B, C and D are incorrect.