Take the infitive form 'aller', remove the -er ending and add the perfect ending -é. Between the participle (allé) and the subject pronoun (je, tu, il etc.), add the auxilliary verb, in this case 'être' in the imperfect tense (eg. j'étais allé = I had gone). BUT REMEMBER to add 'e' (if the subject is feminine) and/or 's' (if the subject is in the plural) onto the end of the participle (allé). (This is because aller is one of a few select verbs which take 'être' as their auxilliary).
Therefore, 'aller' is conjugated in the pluperperfect tense like this: j'étais allé(e), tu étais allé(e), il/elle/on était allé(e), nous étions allé(e)s, vous étiez allé(e)s, ils/elles étaient allé(e)s