Here's how I see events playing out:
Gordon - He was hit by the Joker but the bulletproof vest prevented him from being killed. As he lay there he got an idea, and when the paramedics came he told them to lie and claim he'd been killed. Normally doctors wouldn't do such a thing, but if they think it could help catch a terrorist they might play along. He probably stays at the hospital overnight and when he hears of Dent's arrest he leaves to protect Dent and hopefully arrest the Joker. Gordon likely showed up at MCU, told someone he was in charge of driving the escort, acted like he knew what he was doing, and nobody questioned him.
Dent - I think his claim that he's Batman is also spur-of-the-moment, though it could be that he planned it out ahead of time and just hesitated before taking the blame. I don't think Dent has any grand scheme in mind; he probably just thinks Batman in too important to Gotham to lose and his pride won't let him give in to the Joker's demands.
Batman - Goes to the conference genuinely planning to give himself up, but after Harvey outs himself as Batman he gets the idea to capture the Joker when he inevitably goes after Dent.