This first part of the battle is rather easy. Ghirahim is now covered in some metallic substance, and cannot be really damaged all to easily.
If you hit him, all you do is push him back. Seeing as you’re on a platform high above the ground, keep hitting him to push him back, using your shield whenever he tries to attack you.
After Ghirahim falls off a platform, jump off of it yourself and do a fatal blow. Continue the cycle described above. Eventually, Ghirahim will start making his hands purple near the edge of a platform.
When he does, carefully note their positions and slice between them so as not to touch them. There is a fair space of time before he does anything.
However, note that if your sword does touch the purple hands, you and he will reverse positions, so quickly move back around! Continue the cycle until Ghirahim summons his weapon.
For this second part of the battle, Ghirahim will swing at you when you’re close; shield bash his attack. In fact, any time he directly attacks you, shield bash him and, while remaining locked-on, do a thrust to hit the gem in the center of his torso.
You’ll want to remain close unless you’re, sadly, taking time to heal – if you’re too far, he’ll merely shoot the red missiles from battles past or a large disc of energy. Both can be shield blocked.
However, the disc can also be hit with your sword in a back-and-forth volley with Ghirahim until you succeed in hitting him with it, stunning him, much like the Phantom Ganon bosses of Wind Waker. Anyhow, continue this until he summons his big sword – makes me think of Cloud Strife, almost.
For the third part of the battle, with the large sword, you’ll need to get close and attack directly. Ghirahim will use the sword to block – if he blocks with the sword vertically, do horizontal slices repeatedly; if he blocks horizontally, do vertical slices.
Continue to slice this while targetting him (and do it fast – he’ll soon jump back and heal his sword). Once you cut through the sword, do a thrust to damage him. Repeat a few more times and you will win.
After defeating Ghirahim, there will be a few story cutscenes. More or less, Demise is unfortunately summoned back, and then challenges you to a battle in another place. He leaves while letting you prepare for the battle.
Before the battle, heal up by sitting in the chair in the Temple of Hylia, then go to the Bird Statue and save. Proceed to the portal of darkness in the pit below, and confirm with Fi that you are ready to fight for the fate of the worlds above and below the clouds.