As much as Brexit was a footgun, this has always seemed to me a very valid criticism of the EU that the remain side of that debate never really tackled. There is a huge democratic deficit in the organisation.
The Council, made up of heads of state, set the direction.
The Commission, made up of whoever is nominated by those heads of state, usually some mate of theirs with no democratic accountability or mandate of their own (see: Peter Mandelson), is the body that decides on and creates legislation.
The Parliament, made up of the actually elected members, seems to exist just to rubber-stamp the output of the other bodies. Or occasionally not, but look what happened here, they were asked again until they did * .
Don't get me wrong, I think there's a lot that's good about the EU too, but it's in need of serious reform before it can claim to be a truly democratic set of bodies.
(* Which is incidentally another criticism of the EU, mostly centred around the time of the Lisbon treaty, which was first put forward as the new EU constitution but, after rejection in some popular referenda in some countries, was renamed the Lisbon Treaty and pushed through again. In the UK this caused waves because the populace was not asked at all about the treaty and Gordon Brown was reported to have snuck-off and signed it into law on the quiet)