"sei secoli erano passati" and "erano passati sei secoli" are both correct, but the secon one is more frequent. It's not a rule, but usually when the sentence has just subject and verb, and you want to focus on the subject, this came after the verb: the last word in a sentence usually is the most significant.
Other examples: "l'ho fatto io" and "io l'ho fatto" both translate "I did it" but the first one answer the question "who did it?" because it focus on the subject, the second one instead is "neutral"
My understanding is that "passare" can be transitive as well as intransitive: https://en.m.wiktionary.org/wiki/passare When used transitively, as in your example, it is conjugated with "avere": I ragazzi hanno passato la prova. (The children passed the test.) When used intransitively, it is conjugated with "essere": Quanto tempo è passato? (How much time has passed?) The difference is that the intransitive verb takes no direct object. This is a good explanation: https://blogs.transparent.com/italian/transitive-and-intransitive-verbs/