The plan to restrict terminations to the first 20 weeks after conception was approved by 228 votes to 196, largely along party lines.
But it has no chance of becoming law as Democrats control the Senate and the White House has threatened a veto.
Most US states allow abortions to when a foetus becomes viable outside the womb, considered to be some 24 weeks.
The Republican leadership pressed ahead with the abortion bill after the case of Kermit Gosnell, a Philadelphia abortion doctor who was recently sentenced to life in prison after being convicted of killing three babies delivered alive.
The legislation passed on Tuesday makes exceptions for victims of rape and incest, as long as they first report the crime to authorities.
Republican congressman Trent Franks, the bill's sponsor, provoked outrage last week when he said in a committee hearing that the "incidence of rape resulting in pregnancy [is] very low".
BBC Washington correspondent Jane Little says that while the bill has delighted the Republicans' core social-conservative supporters, it may alienate the female, young, and independent voters that party bosses hope to win over.
Controversial remarks about abortion by Republicans provoked a backlash during the November 2012 elections.
One candidate said women's bodies could prevent pregnancy in cases of "legitimate rape"; another said pregnancy resulting from rape was "something God intended to happen".
Ten US states have passed laws similar to the House bill, although several are facing legal challenges.
The Republican-controlled US House of Representatives has passed a bill that would introduce strict abortion limits.