Members of the House and Senate banking committees agreed yesterday to pump $8.5 billion into the Federal Savings and Loan Insurance Corp., the insolvent federal fund that insures deposits at savings and loan institutions.

The agreement was the last needed to reconcile banking bills recently passed by the two chambers of Congress. It brings lawmakers a step closer to passing the first comprehensive banking legislation in five years. But it also increases the chance of a veto by the White House, which thinks the $8.5 billion bailout is insufficient and that many other provisions in the bill are anticompetitive and bad for consumers.

The FSLIC bailout is at least $1 billion bigger than originally agreed to by the conferees, but is far short of the $15 billion that regulators and the White House had said was needed for the FSLIC, which ended 1986 $6.3 billion in the red. Regulators estimated that $15 billion was the minimum needed to close several hundred ailing S&Ls that are being kept open because the government lacks the funds to close them.

The savings and loan bailout is part of a comprehensive package that also would close the legal loophole that permitted the creation of so-called nonbank banks and would impose a nine-month freeze on banks' expansion into the securities and insurance industries.

Several S&L and banking lobbyists said Treasury Secretary James A. Baker III and White House Chief of Staff Howard H. Baker Jr. met yesterday and agreed that President Reagan is likely to veto any legislation that provides less than $10 billion for FSLIC or hampers deregulation of financial services.

But winners in yesterday's compromise bill -- notably the securities and S&L industries -- bet that the White House wouldn't dare kill the package.

"I don't think that's a very good bet," responded Charles O. Sethness, assistant secretary of domestic finance for the U.S. Treasury. But supporters of the bill said administration officials are too worried about the FSLIC's condition and sagging public confidence in S&Ls to risk a veto.

The entire banking package, the result of five days of haggling by the members of the two chambers, may never get far enough to be vetoed. The bill goes to the floor of the House and Senate. Several lobbyists warned that the bill could get stuck in the House Rules Committee, which must decide whether to present the package to the full House or let it die.

Yesterday's agreement is considered a moderate victory for the U.S. League of Savings Institutions, which wanted no more than $5 billion for FSLIC and vigorously opposed the $15 figure.

As part of the FSLIC bailout, conferees watered down a provision to force regulators to go easy on troubled Texas S&Ls. House Speaker Jim Wright (D-Tex.) had pressed for special favors for Texas institutions, but Sen. Phil Gramm (R-Texas) succeeded in getting a more moderate plan adopted.

At one point, Gramm joked about how hard Wright had been lobbying the conferees by referring to the speaker as "the phantom conferee."

Some members of the conference committee were skeptical that much had been accomplished. "Confronted with an industry that is undercapitalized, overregulated and overextended, I fear the {FSLIC} bill is too little, too lax, too late," said Rep. James A.S. Leach (R-Iowa).

For consumers, the package would force banks to clear checks faster.

The entire package is also considered a victory for the securities industry. Bankers were considered the big losers. A telltale sign came last Thursday when the conferees met in a Senate room where only congressional staff and the press were permitted entry. At the invitation of Sen. Alphonse D'Amato (R-N.Y.), however, an exception was made for the lobbyist representing the securities industry and foreign banks. He was allowed in while the lobbyist for U.S. banks was relegated to a couch outside the chambers.

Banking consultant Karen Shaw, president of the Institute for Stategy Development in Washington, said the bankers hardly had a chance against the intense lobbying efforts of the S&L and securities industries.

Many bankers fear that the moratorium on new bank powers will be extended when it expires in March, while securities and insurance companies will continue to invade bankers' turf.