The two phases are very similar in meaning. The words "gates" and "doors" refer to the gates of the temple. The writer is speaking to the gates as if they were a person. A gatekeeper would be the one to open the gates. See how you translated this in [Psalms 24:7](../024/007.md). Alternate translation: "Open up, you ancient gates" or "Open these ancient gates" (See: [[rc://en/ta/man/translate/figs-parallelism]] and [[rc://en/ta/man/translate/figs-personification]])
It is uncertain what specific part of the gate is the "head." But, it stands for the gate as a whole. (See: [[rc://en/ta/man/translate/figs-synecdoche]])