I let go of the door. The door opened and both the men came in.
That usage of "both" is grammatical in today's standard English. In your example, the word "both" is functioning as a predeterminer.
Your suggestion of "the door opened and both men came in" is fine too, where the word "both" is functioning as a determiner.
Here is an excerpt from the 2002 CGEL that's related to your question, on page 376:
Relation between determiner and predeterminer constructions
All and both are unique among the determinatives in that they function as either determiner or predeterminer:
- i. [ All / Both students ] failed the philosophy exam. -- [determiner]
- ii. [ All / Both the students ] failed the philosophy exam. -- [predeterminer]
With both such pairs are equivalent. Both students (in contrast to two students) is definite: it denotes the totality of an identifiable set. The expresses nothing more than definiteness, so adding it to the already definite both students has no effect on the meaning.
NOTE: The 2002 CGEL is the 2002 reference grammar by Huddleston and Pullum (et al.), The Cambridge Grammar of the English Language.