The storyline is actually hilarious, aperture science was created by Cave Johnson. Aperture used to just be a company for designing shower curtains that appear more hygenic. When Cave was exposed to mercury his kidneys soon began to fail and he recieved brain damage. On his death bed, he came up with a 3 tier plan to help future benefit Aperture, or something..
* Tier 1: The Heimlich Counter-Maneuver - "A reliable technique for interrupting the life-saving Heimlich Maneuver." In other words, ensure choking.
* Tier 2: The Take-A-Wish Foundation - "A charitable organization that will purchase wishes from the parents of terminally ill children and redistribute them to wish-deprived but otherwise healthy adults." It counters the real-life Make-A-Wish Foundation, designed to grant wishes to terminally ill children.
* Tier 3: The 'Portal' project - As said by Johnson when it was first laid lout: "Some kind of rip in the fabric of space... That would... Well, it'd be like, I don't know, something that would help with the shower curtains I guess. I haven't worked this idea out as much as the wish-taking one." This is what will become the 'Portal' project, involving the Aperture Science Handheld Portal Device and its creation of portals.
Basically, one of their employees actually makes some progress on the third tier, they start working on that, then Black Mesa starts working on similar technology, in response Aperture begins work on GlaDoS, once activated she kills practically everyone, they install a morality core, then blablabla, Chell is a test subject.
Doug Rattman designed the Disk Operating System and more for GlaDoS, then is a forced subject later, he creates the little Rattman holes you find in the game.
Anyway, full story here.
http://half-life.wikia.com/wiki/Aperture_Science