STRASBOURG, France—The European Parliament issued a rare admonishment of a member state, with lawmakers saying Hungary was becoming an authoritarian state in the heart of Europe that encourages nationalists across the continent to follow in the same path.

The European Union’s legislature voted overwhelmingly to label Prime Minister Viktor Orban’s government a “systemic threat to the rule of law.” The vote carries no immediate consequences, though it could theoretically lead to sanctions.

Mr....