According to my study material, '頭が下がる' means to be respect someone (especially for something so good, you cannot imitate it). Obviously it stems from the fact that lowering your head = bow=respect. However, i've also watched many japanese tv shows, where something along the lines of 'atama sagatte' is used to ask someone to literally, physically bow. What is the grammatically correct way to use this phrase in this sense?
下がる is an intransitive verb and 下げる is a transitive verb. So 頭を下がる is unnatural.
頭が下がる means "take my hat off to", "to respect someone" as you said.
頭を下げる means "apologize".
Of course, they can have the literal meaning such as "lower one's head", "a head is lowered".
You can judge which meaning it is by the context.