The poison had Luffy dizzy and disoriented, he quite literally couldn't see straight, so he was swinging wildly hoping to hit him. The unfortunate truth is that Luffy just wasn't ready for this fight. If Luffy had just made a run for it, got past Magellan and the demon guards and perhaps collapse the passage behind him then maybe he might have had a chance. That's not who Luffy is, however, and that sealed the fate of this confrontation.