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?
As is the case with the chief executive in most parliamentary systems, by voting for an MP (in the case, MEP) of the party which backs their preferred (or opposes their opposed) candidate for leader.
But since you asked look at how little power a British MP has to get a private member's bill through to a vote. In actual fact the only private member's bills that get a vote let alone pass are those with government support.
Also the House of Common's isn't really democratic in any meaningful sense of the word. It took 886,400 votes to get 1 Green MP but only 25,900 votes per SNP MP. Similarly 38,300 per Conservative MP to 336,000 per LibDem MP. That's an order of magnitude difference between votes to power.