Go into the chamber and jump over the laser or use portals to get past it. Pick up the companion cube, and GlaDOS will fizzle it. Pick up the second one and she'll fizzle that one too. Finally, grab the third one and this time she won't actually fizzle it. Put it into the path of the laser to make the platform come back down to your level (it's on the wall across from the entrance.)
Step onto the platform, then put a portal under the cube and another on a wall somewhere to take it out of the path of the laser, making the platform go back up.
You need to get the cube up here, so make a portal on one of the angled walls in this area, then make another portal on the floor under the cube down there. Go over and pick up the cube. Put a portal on the angled wall on the right (you won't be able to reach the exit using the angled wall on the left), then make a portal of the opposite color on the floor down there such that you will be able to fall into it while holding the cube. Pick up the cube and fall down into that portal.
You should land on the area with the big red button. Put the cube there. Then put a portal to the angled wall on the left, and drop down into a portal on the floor down there like before. You should land on the area with the exit.
GlaDOS will say that the emancipation grill is broken and "don't take anything with you." You don't have to let her boss you around. Put a portal onto the wall near the elevator, then go get the cube and drop down through a portal in the floor. GlaDOS will fizzle the cube as you walk toward the elevator, but it was fun while it lasted. And you get an achievement for doing this. Go into the elevator.