Strictly speaking, words don't have parts of speech or indeed any properties at all.
Look at this from the point of view of Luciene Teniere's 'valency grammar, in which a sentence is a sequence of slots with a function, and constructed by dropping appropriate fillers (words or phrases) into the slots. Very briefly, "cats catch mice" has three slots - subject, filled by a doer (cat). Verb, filled by what is done (catch), and object (mice), that is filled by the victim of what is done. If the cats are big hairy salivating ones, then "big hairy salivating cats" would fill the object slot.
The point here is that the 'noun' characteristics of 'cats' do not come from any quality of the word itself, but from the slot it fills in the sentence and how it functions there. This can be seen when 'wrong' words are dropped into slots. A gerund? An -ing verb dropped into an object slot. Elsewhere on this site there is a question about adjectives being used as nouns, with 'The successful are those who strive' as an example. I pointed out that 'the sucessful' is a nominal adjective rather than a noun, but that invites the question "what is a nominal adjective?" It is an adjective being dropped into the object slot of a sentence where we would expect to see a noun.
By putting these words in object slots they have to function as a name of something - become a noun - so we have the same orthographic word functioning as different parts of speech depending which sentence slot it is put in.