Was there anyone in the room?

Literal

Room [in-には] someone existed [question-か]?

いましたか is the polite past form of いる, used here to ask about someone's prior presence. 誰か ('someone') combined with いる and か forms a simple yes/no existence question in the past.