Perhaps it would help to reorder the words in the sentence as follows:
Here lies one who knew how to get men who were cleverer than himself around him.
It means that Carnegie knew how to surround himself with men cleverer than himself. "him men" isn't a grammatical unit; the grammatical units are actually "around him", which is an adverbial phrase of place, and "men who were cleverer than himself", a noun clause that serves as a direct object of the verb "get".
In ordinary English, the sentence boils down to:
X lies here.
The inversion is for effect, and conventional on tombstones. But
grammatically, the sentence nevertheless is a subject (the noun clause "one who knew how to get around him men who were cleverer than himself") + a verb ("lies") + an adverb ("here").
The noun clause itself has a subject ("one"), then a relative pronoun ("who") that serves as the subject of the verb ("knew"). The direct object of that verb is itself another noun clause: he knew Y, where Y, the direct object, is "how to get around him men who were cleverer than himself".
In that noun clause, the subject is the same as that of the previous verb, "knew", so it's left unstated or implicit. How is an adverb that premodifies "to get around him men who ...". "To get" is the verb; "men who were cleverer than himself" is yet another noun clause that serves as the direct object; and "around him" is an adverbial phrase of place that answers the question "where?"
The direct object, the noun clause "men who were cleverer than himself", has a subject ("men") an an adverbial clause of comparison ("who were cleverer than himself"). This adverbial clause has a relative pronoun ("who") for the subject, a verb ("were"), and a subject complement ("cleverer than himself") that effects the comparison.