Excuse my poor sentence structure in the following spoiler.
If you're like Cheesicle and get easily butthurt at spoilers, DO NOT FOR THE LOVE OF GOD read it.
You start out the game waking up in a cryo-stasis chamber of some sort, made to resemble a hotel bedroom.
Everything is extremely deteriorated, and Wheatley comes and uses your chamber as a ram to break through a wall, and into the first testing chamber from Portal 1. Shortly after retrieving the portal gun (Which can only make blue portals at the time) you go through a few test chambers until you and Wheatley have to go through GLaDOS' abandoned holding chamber to "escape", at which point Wheatley accidentally reactivates GLaDOS and she supposedly destroys Wheatley and forces you to go through more testing chambers. After awhile, Wheatley turns out to be alive and breaks you out of one of the chambers, at which point you go back to GLaDOS. You confront her, and opt into a core switch to replace GLaDOS with Wheatley so that he can control the facility. After installing Wheatley as the new controller of Aperture Science, he goes power-crazy and transfers GLaDOS' AI unit to a potato. He then throws you along with GLaDOS into a nearly bottomless pit, and during your fall GLaDOS explains to you that not only is Wheatley a moron, he's a product of all the scientists of Aperture working together to create the dumbest idiot possible. She also tells you that with him running the facility, it is only a matter of time before Aperture Science's large fission reactor powering the facility explodes, destroying the entire facility in the process. Once you reach the bottom of the pit, you make your way through a massive pit of rubble to the old, abandoned Aperture Science Innovators' testing facilities, dating back to 1952. During this time, you discover the entire history of Aperture Science including its rise to fortune, its long-lasting rivalry with Black Mesa, and its eventual bankruptcy. After working your way up through the abandoned (But still functional) testing facilities, you discover that Cave Johnson requested that his assistant Caroline's brain be transferred to an AI unit, in the event of Cave's death before such a procedure is possible with himself. Combining this knowledge with specific dialogue from GLaDOS, you realize that she is Caroline in computer form, put in charge of the facility years ago. Eventually, you reach the modern branch of Aperture at which point Wheatley puts you directly back into testing, and you realize just how much he's let the facility deteriorate. After awhile, you find out that Wheatley has discovered two robots designed for testing (Co-op bots) and no longer requires you. After he tries to kill you and you escape, you ultimately make it back to his chamber where he tries to kill you again. Although he has learned from GLaDOS' previous mistakes and removed all portal surfaces from the room, he shoots bombs at you and you trick him into blowing up a portal gel pipeline, covering the floor and multiple panels in the gel. You attach corrupted personality cores to him, to make him subject to another core switch. However, he disagrees and you have to press the "stalemate resolution button". Once you do, a row of bombs placed by the button explode, hurling you across the room and onto the floor. As the building begins to collapse, you see a part of the roof tear away that exposes the moon in the night sky.
Having earlier found out that the portal gel is made of moon dust, which according to Cave Johnson is "an excellent portal conductor", you shoot a blue portal at the moon.
A moment later, you see a small twinkle, and suddenly there is a gaping vacuum in the center of the room. You grab onto Wheatley, and find yourself on the surface of the moon staring at a USA moon base. GLaDOS knocks you and Wheatley off, and immediately grabs your arm and pulls you back in.
After recovering, GLaDOS admits that you were ultimately her best friend instead of her worst enemy. However, she also tells you that you make her life more difficult, and she has decided that the easiest solution is to simply get rid of you. A lift begins, and you find yourself going up an elevator past all of Aperture Science. Finally, the door opens and you find yourself in a wide, open field with the sun shining brightly. You hear the sound of a door slamming, and look behind you to see a small, closed, casual-looking shed. The door opens again, and the Weighted Companion Cube rolls out, covered in soot from the incinerator. As the door closes, your screen goes black and the credits begin.
Also, Bruce Willis was dead the whole time.