To supplement what flint72, the copula in Irish is a bit odd. With the copula, things are 'backward'. Rather than being Verb-Subject-Object, it tends to be more Verb-Comment-Topic.
The formula for sentences like this is always 'is <obj> <subj. pron> (<subj>)'. Given you've done Spanish, it's not unlike the way that Spanish sometimes has you include an object pronoun twice in a sentence like 'él se lo dice a ella'.
This switch in the focus of the sentence is used a lot for emphasis in the language. For instance, if I wanted to say 'it's hot', I'd say 'tá sé te', but if I wanted to put emphasis on the hotness (for instance, for contrast or just to be emphatic), I'd say 'is te atá sé', which literally means 'it's hot that it is', or more idiomatically, 'it's hot'.
The copula can behave oddly in other ways. For instance, if I wanted to say 'My name is Keith', I'd say 'Cíat is ainm dom', literally 'Keith is name of-me'.
The copula's comment can't be definite. So, if I wanted to say 'John is a teacher', I'd say 'Is múinteoir é Séan'. However, if I wanted to say 'John is the teacher', I'd write 'is é Séan an múinteoir'.
Finally, there's comment fronting, which is used if you want to put emphasis on the comment. In this, the comment is moved before 'is' and is replaced with the pronoun 'ea' (meaning 'it', which is only used with the copula). Example: 'múinteoir is ea é Séan'.
The copula is probably one of the more awkward elements of the language to grasp, but it's not as difficult as the contract between ser/estar in Spanish as its use is more limited and stereotyped. However, like ser, 'is' is all about inherent properties of the topic.
I hope that helps a bit and my explanation hasn't been too confusing.
Well for one, if you broke the sentence up, "Is ainmhithe iad" makes sense on it's own, and means "they are animals". Then when you add in "na capaill" you are replacing the pronoun "they" with "the horses".
The word that is inside "is ... é" is what "é" is. (I hope that makes sense!). So here "ainmhithe" is inside, so that is what "they (the horses)" are.
I think you'd simply swap the relevant words. Sentences in Irish that start with
is are Verb-Complement-Subject. (or Verb-Comment-Topic depending on who you ask. For our purposes here, that's virtually synonymous.) So if
The horses are animals is
Is ainmhithe iad na capaill, then I'm pretty sure
The animals are horses would be
Is capaill iad na ainmhithe.
First, translation is not about being literal. It's about how it's actually said in the target language.
Second, that wasn't literal. English syntax is Subject-Verb-Object. Irish syntax is Verb-Subject-Object. For sentences that involve
is, the syntax is Verb-Complement-Subject or Verb-Comment-Topic.
If you were to translate
Is ainmhithe iad na capaill word-for-word, that would be "Are animals they the horses". In English syntax, that would be "They are animals, the horses".
The subject "they". Not "them" as in an alternative definite article for "horses".