。
The room was locked.
Literal
Room [in-には] lock [subject-が] was-engaged.
鍵がかかる is the intransitive expression for 'to be locked' — the lock engages itself. The transitive counterpart is 鍵をかける (to lock). The ~ていた marks the resulting state.
The room was locked.