According to the Oxford online dictionary, a Thane is:
(in Anglo-Saxon England) a man who held land granted by the king or by a military nobleman, ranking between an ordinary freeman and a hereditary noble.
Wikipedia says in Medieval Scotland a Thane was:
Thane was the title given to a local royal official in medieval eastern Scotland, equivalent in rank to the son of an earl, who was at the head of an administrative and socio-economic unit known as a shire or thanage.
In William Shakespeare's Macbeth, Macbeth holds the title "Thane of Glamis". In the first act, after the declaration of the forthcoming execution of the treacherous Thane of Cawdor during wartime, King Duncan names Macbeth the new Thane of Cawdor, in addition to Glamis. The Three Witches' foreknowledge of this is an important plot device, especially when Macbeth discovers that their prediction turns out to be true. This causes Macbeth to contemplate the truth of the Witches' further prophecy that he will become King of Scotland; Macbeth's behaviour based on this belief drives the central action for the rest of the play.
Wikipedia also defines a Thegn as:
The term thegn (thane or thayn in Shakespearean English), from Old English þegn, ðegn, "servant, attendant, retainer", "one who serves", is commonly used to describe either an aristocratic retainer of a king or nobleman in Anglo-Saxon England, or, as a class term, the majority of the aristocracy below the ranks of ealdormen and high-reeves. It is also the term for an early medieval Scandinavian class of retainers.
the article then discusses in detail the status of Thegns. In general a thegn was a member of what could be called the gentry or lower nobility who served as a retainer or official of the king or the a high noble man or high churchman or served in local government.
So in the content of a disastrous battle the thanes or thegns of Hurin would be his warriors, especially the higher ranking ones, standing with loyalty by him and sharing his loyalty to the elf king he served, and dying nobly at his side. In the later versions of the story they made a last stand to hold a pass to enable King Turgon of the hidden Kingdom of Gondolin and his army to return in secrecy to his hidden kingdom and keep a faint ray of hope alive for elves and men were everything else was being lost and crushed.
I would guess that "Thanes like Gods" would mean that their heroic self sacrifice and loyalty made "the poet" (Tolkien would naturally write the poem as if it was being written by a descendant of the Edain) describe them as having earned some of the nobility and glory of the gods, as the Valar were called in early stages of the mythology.