It all started with a beach ball alien.
When Dan O'Bannon was attending the University of Southern California, he collaborated with fellow student John Carpenter on Dark Star. Carpenter intended Dark Star to be his master's thesis, but the little science fiction comedy that could eventually made its way into theaters.
Dark Star is, at best, a cult film today—mostly notable for having the only beach ball alien in cinematic history—but while working on it, O'Bannon met future collaborators like Ron Cobb and Ron Shusett. It also made him want to do a film with a realistic, frightening alien. "It was that beach ball that made me want to do Alien so badly," he said (source).
O'Bannon would go on to work with Alejandro Jorodowsky on Dune—a film concept so bizarre that it would have made David Lynch's Dune look like Death of a Salesman. Unfortunately, because we can't have nice things, Jorodowsky's Dune never made it past pre-production. (There is a movie documentary covering the unfinished Dune project, if you're into that.) But something good did come out of this collaboration: O'Bannon met another future Alien collaborator, H. R. Giger.
When the film failed, O'Bannon moved onto Shusett's couch. The desire to move off said couch that got him really working on Alien (source), and Shusett helped O'Bannon flesh out the story concept. In fact, he's credited with thinking up the devious means by which the alien finds its way onto the ship. The script eventually made its way into the hands of Brandywine Productions co-owners Walter Hill and David Giler, and the rest is history.
… Or at least it would be if that is how movies worked. But they don't.
The truth is that Giler and Hill took O'Bannon's script through several rewrites. Some of the changes were small—for example, renaming all the characters—while others were so insane that they would eventually be re-edited out. To give you an idea of how crazy some of those rewrites got, one of their treatments featured Attila the Hun (we kid you not) (source).
One change that did make it through was making Ripley into a woman. O'Bannon and Shusett made a note that they had intended the script to be unisex, so any character could be switched to be played by a woman. Sure, they never intended the surviving character Ripley to be made a woman—but we think you'll agree that the change was a good one (source).
Thanks to Alien, O'Bannon was eventually able to move off Shusett's couch for good, but the two did work together again on the classic Total Recall. Despite his subsequent career, O'Bannon is still best remembered for that little alien that burst forth from Kane's chest and ruined a perfectly good dinner—and bought O'Bannon's dinner for years to come.