As in many languages, the word for man's best friend has been quite flexible and variable over the centuries in Gaelic, for not to say downright confusing at first glance.
It would appear that the common standard Gaelic word for a "dog" was once and for many years the same word still used in Gaelic-speaking Scotland: "cú", with the quite irregular plural form of "con".
Then I guess that through the influence of the nobility and their great emphasis on hunting and their regulating it, the meaning of this word "cú" in Ireland started to shift, now basically meaning what we would nowadays in English call a "hound", which would include such breeds as greyhounds, whippets, and the tallest of all dogs: the majestic Irish Wolfhound ("cú faoil Gaelach").
The plural of "cú" is still officially "con" (the Gaelic name for the Irish Greyhound Board is "Bord Na gCon"), but in dialectal speech often "cúití", and also the more predictable and regular "cúnna".
Now that the previous general word had been reallocated, a new general word was needed (very parallel to what happened in English at about the same time, what with a kind of switching around of "dog" and "hound"), so that now the most common Gaelic word for "dog" in its most standard form is spelt "madra" with its plural "madraí", based on a southern (province of Munster) pronunciation.
However, in more northern areas such as Mayo and Donegal the word would more accurately be spelt "madadh", as it is pronounced without any R sound, and with a flexible ending to show the genitive and other grammatical cases.
In Galway Gaelic this all gets a bit mixed up, where in singular it's pronounced in the northern way, with no R sound, (and usually without the audibly flexible ending), but then in plural they usually use the southern version, with a clear R sound.
Maybe this confusion is why in some parts of Galway they use a completely different word for "dog", not so well known but more regular in its plural and other forms: "gadhar", which in plural is predictably "gadhair".
"Tá saol an mhadaidh bháin aige"
"He has the life of the white dog", which means something like "he has an easy or privileged life", practically the opposite of the similar English expression "It's a dog's life".
I get the feeling that the word for cat has usually been much more constant and stable, but maybe that's just a false impression from the few languages I know, is it?