In some ways, the European Union (EU) and the United Nations (UN) are quite similar. However, there are major differences. In general, the EU tries for, and achieves, much greater coordination between, as well as control over, its member states. The UN is a much looser confederation.
The UN includes essentially all of the nations of the world. It attempts to give those nations a forum in which to interact and in which they can solve some disputes. The United Nations also has many agencies that are meant to help its member states. These organizations do things like trying to promote sound economic policies or trying to promote children’s health.
By contrast, the EU includes only those European countries that want to join and which the EU has accepted. It attempts to create structures that bind those countries together by law. The EU has a number of powers (given to it by treaties signed by the various members) that allow it to dictate to member states. It has the power, for example, to require member states to adopt certain economic regulations. The EU is attempting to integrate its countries more and more closely together, to the point that they would actually become more like one big country.
The major difference, then, is that the EU is made up of a small number of countries that are moving, in general, towards very tight integration. By contrast, the UN is made up of a very large number of countries that have no intention of actually being governed by the UN to any serious extent.