This is the 14265th most frequent Korean word.
모였던
"모였던" means "had gathered" or "were assembled."
Here, "모였던" is used to describe a past event where people came together.
사람들이 공원에 모였던 이유는 기념식을 위해서였습니다.
The reason people gathered in the park was for the ceremony.
In this sentence, "모였던" refers to the previous event of students gathering and specifies when it happened.
학생들이 교실에서 모였던 시간이 밤 늦게였어요.
The time the students gathered in the classroom was late at night.
The word "모였던" denotes the descriptive aspect of the prior gathering at a specific location.