Portal 4 starts off with Test Subject 1/2076 (Chell Clone 2076) waking up in a heap of rubble. She picks up her Portal Gun and walks out. The next area is dark, and the lights are malfunctioning. A grinding sound plays, usually startling the player, and they turn around to discover a Companion Cube with a body, similar to the cores with bodies seen at the end of Portal 3. The lights then go on, and Wheatley(Likely 2.0 but not confirmed) comes on over the intercom.
He says that you must begin testing immediately. You continue through 35 easy test chambers, 50 hard ones, and 25 very hard ones. Afterwards, you go to the Adventure Core's chamber due to a malfunction. You defeat him and the other three bots, then progress to Wheatley's chamber.
After you defeat him, you are ejected out onto the surface of the moon, and something seeps over your vision, a something that was revealed at the beginning of the next game to be the Ditto Gel.
The game was not received as well as any of the other games in the series, due to it's lack of storyline, as well as not having an ending song. However, it was made up tenfold by the release of Portal 5.