It does work like iść/chodzić, but I would add one thing: it's either on foot or unknown/irrelevant.
I mean, if they needed to take a bus, but the bus part really doesn't matter - what matters is that they went to church, then "poszły" is fine. Or you can specify that they went by some vehicle and say "pojechały".
Do you mean, why is the verb feminine? If so, simply because "Dziewczynki", the subject of the verb, is feminine.
Or, do you mean, how can I tell that "poszły" is feminine? If you'd like to take a look at https://en.wiktionary.org/wiki/p%C3%B3j%C5%9B%C4%87#Polish and expand the conjugation, you'll find that form in the plural non-virile column (as opposed to the male form "poszli", which is in the plural virile column.