WASHINGTON—A divided House voted Friday to block Planned Parenthood’s federal funds for a year, as Republican leaders labored to keep GOP outrage over abortion from spiraling into an impasse with President Barack Obama that could shut down the government.

The House used a nearly party-line 241-187 vote to clear the legislation, which stands little chance of enactment. Senate Democrats have enough votes to block it, and for good measure the White House has promised a veto.

Yet...