https://taxfoundation.org/top-individual-income-tax-rates-europe-2019/ According to this link, different European Union countries have different tax rates. But don't EU laws and the EU government in Brussels take priority over governmental laws. I am aware that some freedom is given to countries to determine some issues, but how much freedom is given, but to what extent? Does the EU act as another layer of government that collects taxes?
There are two aspects of taxation (in the broader sense) that are extensively regulated by the EU:
Customs duty: Those have been fully harmonised, there is a single external tariff, national customs authorities collect these on behalf of the EU (it's still one of the largest of the EU's “own ressources”)
VAT: The exact rates and set of products that are exempted can differ but EU countries have to collect VAT and implement a very specific framework (with minimal and maximum rates, a maximum numbers of tiers, etc.)
For the rest (taxes on income, corporate profits, wealth, inheritance, real estate, vehicle purchases, etc.) there is very little harmonisation not only of the tax rate but even of the structure or basis for taxation. The Commission has been trying to use other rules to influence member states (e.g. rules on state aid to fight tax rulings or rules on discrimination to fight the German plans for a motorway toll) but there are still huge differences and little consensus on whether and how taxes could be harmonised at the EU level.
In general, EU law does take precedence but in areas where there isn't a whole lof of EU law (like taxes, with the exceptions noted above), member states retain a lot of freedom.
The EU does not collect direct taxes, those are a national competence. The EU does concern itself with setting harmonised standards for direct taxation; to eliminate tax avoidance, double taxation, aggressive tax planning and indirect taxation (VAT, etc) to avoid distortions of the single market.
Tax policy in the European Union (EU) has two components: direct taxation, which remains the sole responsibility of Member States, and indirect taxation, which affects free movement of goods and the freedom to provide services in the single market.
With regard to direct taxation, the EU has however established some harmonised standards for company and personal taxation, and member countries have taken joint measures to prevent tax avoidance and double taxation.
On indirect taxation, the EU coordinates and harmonises law on value-added tax (VAT) and excise duties. It ensures that competition on the internal market is not distorted by variations in indirect tax rates and systems giving businesses in one country an unfair advantage over others.
There's a lot of information under the top-level page there, which I'll leave for you to discover on your own, but the EU does not set or control income tax rates within its member countries.
The question is fundamentally flawed from the title.
To start off, the European countries have all the freedom. The EU is but a collective that decides on common rules. Nothing becomes an EU directive or regulation without the support of a supermajority of governments of the Member States. In general, the Member States strive for unanimous support of their compromises although this has become more difficult to achieve following the admission of new Member States since 2004.
Second, one of the major working principles of the EU is subsidarity. This means that the EU will only attempt to regulate issues if there is a major benefit to harmonisation compared to the Member States regulating individually. (In general, whatever can reasonably be performed at a lower level should be performed at a lower level.) A lot of taxation questions will not only immediately effect the national budgets of the Member States but also reduce their advertising power, if you will.
As Member States have a high interest in keeping everything taxation-related regulated at a Member State level and as there is generally very little reason for harmonisation besides a general yes/no question, these powers have generally not been delegated to the EU.
The most obvious exception is customs duties. This is mostly a direct consequence of the Free Market as goods can move freely between Member States. If Member States were to implement different customs rates, this would lead to goods mostly entering via the cheapest Member State which would put the others at a disadvantage.
On the other side, many other taxes will not have such a strong directing effect: taxes are only one factor among many when businesses consider where to open their doors and they are even less of a factor for individuals.
The question of funding of the EU institutions is another one. Currently, the EU is funded entirely by contributions from the Member States. These contributions are fixed in various ways so that the EU institutions can reasonably plan their budget.
The question of a tax levied by the EU for the EU has been brought up repeatedly; if I recall correctly, the European Green Party favours a finance transaction tax which would be levied by the EU and directly enter the EU's budget to reduce its dependence on the Member States. However, this proposal (or any other) has not been adopted.