WASHINGTON, May 3 — The House of Representatives voted today to extend “hate crime” protection to people who are victimized because of their sexuality. But the most immediate effect of the bill may be to set up another veto showdown between Democrats and President Bush.

By 237 to 180, the House voted to include crimes spurred by a victim’s “gender, sexual orientation or gender identity” under the hate-crime designation, which now applies to crimes spurred by the victim’s race, religion, color or national origin.

“The bill is passed,” Representative Barney Frank, a Massachusetts Democrat who is gay, announced to applause, most of it from Democrats.

Similar legislation is moving through the Senate. But even assuming that a bill emerges from the full Congress, it will face a veto by President Bush on grounds that it is “unnecessary and constitutionally questionable,” the White House said before the House vote.