The term 'old hat' began to be used in the early 20th century; for example, this piece from the Cornish writer Sir Arthur Thomas Quiller-Couch's novel Brother Copas, 1911:
"And the difference is not that religion has ceased to teach it - for it hasn't - but that men have grown decent and put it, with like doctrines, silently aside in disgust. So it has happened with Satan and his fork: they have become 'old hat'."
There is no reason to believe that Quiller-Couch was alluding to anything other than the worn out and hackneyed appearance of old hats. It is quite likely that he wasn't aware of an earlier meaning of 'old hat', which had gone out of use by the 20th century. That was an altogether more vulgar allusion; to the female vulva. This was referred to quite explicitly in Thomas D'Urfey's comic play The Intrigues at Versailles, 1697:
"Why, how now, ye piece of old Hat, what are ye musty? the Jade's as musty as a stale pot of Marmalade of her own making."
George Grose, in the 1785 version of his A Classical Dictionary of the Vulgar Tongue, lists the term like this:
"Old hat; a woman's privities: because frequently felt."
Whether the 'frequently felt' joke was the origin of the term or whether it was just Grose's little pun isn't clear. He certainly did enjoy plays on words and his work is full of them. He was an extremely fat man and often made punning reference to his own name and the grossness of his physique. None of the other early citations of the term with its earlier meaning make any reference to the play on words origin.