The final fight is a three-round pattern of redirecting Wheatley's own bombs back at him. Here is the full sequence.
When he starts throwing bombs, get behind the conversion gel pipe and shoot it until it bursts, spreading conversion gel across the room. Place a portal on any panel near the top of the chamber, dodge a volley, then place the second portal where the bombs are landing. They will strike Wheatley. GLaDOS drops a corrupted core — collect it and use the new repulsion gel to attach it to him.
He will shift his shields. Repeat the trick, but this time put the portal directly beneath him rather than on a panel. The bombs connect, another core arrives in the same place, and attaching it is a little harder while he is moving.
Do it once more, making sure your panel is behind Wheatley so the bombs hit him instead of the shields, with the second portal where they fall. He is stunned again. Rather than the catwalk, look to the left of the broken conversion gel pipe and wait for the final core.
Under the propulsion gel pipe sits a panel coated in conversion gel. Portal on that panel, portal on the ground beside it, then use the gel to launch yourself through, grab the core and attach it.
After the cutscene, place one portal above the stalemate resolution button and another beneath Wheatley. Jump through, hit the button, and enjoy the ending.