Is the European Court of Human Rights part of the EU?
No. They are entirely separate institutions belonging to different organisations, and conflating them is among the most persistent confusions in British public discussion.
The European Court of Human Rights (ECtHR), in Strasbourg, is a court of the Council of Europe — an organisation founded in 1949 with a much broader membership than the EU, including Norway, Switzerland, Iceland, Turkey and the United Kingdom. It rules on alleged breaches of the European Convention on Human Rights.
The Court of Justice of the European Union (CJEU), in Luxembourg, is an institution of the European Union. It interprets EU law and rules on disputes between member states and EU institutions.
The UK's position. The UK left the EU and is no longer subject to the CJEU in the way it was. The UK remains a member of the Council of Europe and a party to the European Convention on Human Rights, so the ECtHR still applies. Membership of the two organisations is independent, and leaving one had no effect on the other.
British involvement in the Convention is substantial and frequently forgotten. The UK was among its architects after the Second World War, with British lawyers — notably David Maxwell Fyfe — playing a leading drafting role, and the UK was among the first states to ratify it.
How it works domestically. The Human Rights Act 1998 incorporated Convention rights into UK law, so cases can be heard in UK courts rather than requiring an application to Strasbourg. UK courts must take Strasbourg case law into account and interpret legislation compatibly where possible; where they cannot, they may issue a declaration of incompatibility, which does not strike down the legislation — Parliament decides what to do about it. This preserves parliamentary sovereignty and is a deliberate design feature.
Exhausting domestic remedies is required before applying to Strasbourg, and the great majority of applications are declared inadmissible.
A third institution frequently confused with both: the European Council and the Council of the European Union are EU bodies, distinct from the Council of Europe despite the names.
General information, not legal advice.