A state can only join the EU by virtue of a democratic decision according to the constitution of the Member State itself, and there are strong requirements on prospective Member States to be themselves proper democracies with separation of powers in order to be allowed to join.
Granted, these requirements have been slightly overlooked when it came to the UK: the House of Lords is undemocratic, one could say outdated, and would almost certainly not be tolerated in any other candidate state.
So, the EU might be complex, but in what sense exactly is it undemocratic?