I distinctly recall discussing Alien right after I had seen it in a movie theatre when it first came out. Someone said something like, "Nature is just as cruel..." and of course anyone who knows about parasitic wasps which lay eggs in cockroaches and other host insects (the creature in the film actually is reminiscent of the metallic-looking wasps (at least one species) that do this -- very shiny and beautiful in a scary way) would understand that guy's comment about Nature.
I suspect Alien is the first film in which this scaled-up parasitism is featured; but was the film the first story in which this occurred? Hard to believe this is not a much older idea. If anything, parasites affecting humans might have been more prominent in the minds of writers 100 plus years ago since there were many diseases that were caused by parasites then, hookworm, malaria, etc. that are now much more treatable. I do not know if people thought of syphilis as a parasitic disease (or if that is even accurate) but of course that was incredibly prevalent and serious. But hookworm is fairly apt since I believe humans are part of the lifecycle.
Though not present much in North America, there is a disease that still exists where not only are eggs laid in humans but the growing creature is large enough to see as a larva -- Chagas disease -- I could be wrong but I think the larva would remind people of the "Chest Burster" with some imagination.
I mention the above potential inspirations as a good reason to think Alien was not the first story in which we encounter this, but I could well see why it was the first movie since the theme is very intense, might not have made it past the censors or whatever if such a movie had been attempted in the 1960s or before. The film, 20 Million Miles to Earth I recall being creeped out a little simply because the egg itself (not of course laid inside a host) was slimy and nothing like, say, an ostrich egg or even a reptile egg -- it actually looked IIRC more like an insect egg or ant larva.