The EU consists of a number of institutions (see here), each with a range of different functions. Whereas in most jurisdictions there is a clear division between the functions of legislature, executive and judiciary (more information on this can be found here), in the EU these functions are shared between institutions in differing combinations for different purposes. However, most EU legislation is proposed by the European Commission and then made jointly by the European Parliament and the Council.
Generally, none of the institutions of the EU have a general law making power equivalent to that enjoyed by the sovereign UK Parliament (more information on Parliamentary sovereignty can be found here). The different institutions have only those particular legislative roles expressly given to them by the Treaty on European Union and the Treaty on the Functioning of the European Union. Accordingly, even in areas which are within the legislative competence of the EU, legislation can only be passed where a legal power to do so is given by a treaty provision. The provision will specify which of the EU institutions (or which combination of institutions) has the power to pass legislation on that matter, and the procedure which must be used.
If there is no express legal power to make legislation, the EU may in some circumstances still be able to make laws which are necessary to further the objectives of the EU by using the general competence provision in article 352(1) of the Treaty on the Functioning of the European Union.