The Democratic - controlled House, over strenuous Republican objections, approved and sent to President Reagan yesterday an emergency farm-credit relief bill that Reagan has said he will veto as unnecessary and too costly.

The 255-to-168 vote generally followed party lines, with 225 Democrats and 30 mostly farm-state Republicans voting in favor of the legislation, and 18 Democrats and 150 Republicans, including most of the House GOP leadership, voting against it.

House Democratic leaders predicted that the House would override a presidential veto, but yesterday's tally fell well short of the two-thirds majority needed to do so.

Nevertheless, Democrats yesterday were relishing the political bind such a veto would cause for Reagan and the GOP.

"Reagan can veto the farm bill, but he cannot veto the problem," said House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.).

House Minority Leader Robert C. Michel (R-Ill.) accused the Democrats of trying to score political points by rushing the bill through without trying to find a compromise acceptable to the White House.

"The need is there; the urgency is there; it's just a question of how to do it," he said. "We seem to be more interested in harvesting votes than in harvesting crops."

The legislation was approved last week by the Republican-led Senate, despite heavy lobbying by the administration and Senate Majority Leader Robert J. Dole (R-Kan.).

Farm-state senators had tacked the credit provision onto a bill authorizing $175 million in disaster and refugee assistance to drought-ravaged African nations.

Administration officials had indicated that, even without the farm provisions, Reagan would be inclined to veto the bill because the amount approved for African drought assistance was seven times more than the administration requested.

The farm bill would make it easier for debt-ridden farmers to obtain credit in time for spring planting. It would provide an additional $1.85 billion in federal farm-loan guarantees this year to help farmers obtain loans to run their operations and restructure their debts.

The administration maintains that its current $650 million loan-guarantee program is adequate.

The bill also would provide $100 million to subsidize lower interest rates for commercial loans. The federal govenment would match the interest-rate reductions granted by lenders who refinanced farm loans. This measure has been denounced by administration officials, and some lawmakers suggested it would be little more than a bank bailout.

The legislation would also allow farmers this spring to get half of the farm-price support loans they normally would receive after the fall harvest. A farmer could get an advance of up to $50,000 this way, to be used to finance spring planting.

Administration officials have said the cost of the combined farm-famine measure could run as high as $7.4 billion this year, then drop to a net total of $1.3 billion for this year and next as farmers repay loans.

However, Democratic officials said the Congressional Budget Office estimates that the two-year cost would be about $500 million.

House Majority Leader James C. Wright Jr. (D-Tex.) said that one-third of American farmers have not been able to obtain financing for the spring planting season, that 100,000 family farms are on the verge of bankruptcy and that rural bank failures are at the highest point since the Depression.

According to aides of Rep. Thomas A. Daschle (D-S.D.), about 400,000 more farmers could face similar problems without the financial assistance in the legislation sent to Reagan yesterday.