Major banks across the country boosted their prime lending rates yesterday from 15 3/4 percent to either 16 1/4 percent or 16 1/2 percent amid predictions that still higher rates are in the offing.

The sharp upward move in interest rates began several weeks ago but really took off a week ago when the Federal Reserve announced an increase in its discount rate -- the interest rate it charges on loans to banks within its system -- from 12 percent to 13 percent.

By yesterday most short-term interest rates had risen by more than a percentage point and the long-term bond market was in nearly complete disarray. Over the last 48 hours even U.S. Treasury bonds were swinging wildly in price with up to $40 gains and losses on some $1,000 bands.

After a number of banks, including Citibank, the nation's second largest, raised their prime rate to 16 1/4 percent, several others, among them No. 1 Bank of America, leapfrogged to 16 1/2 percent. A spokesman for Morgan Guaranty Trust Co. of New York said its move to 16 1/2 percent "reflects our judgment as to the proper rate in view of the strength of loan demand and the cost of funds."

The U.S. dollar also rose sharply against major currencies yesterday and the price of gold declined, reflecting the record U.S. interest rates. Gold fell $28 an ounce in London to $629.50 and, in New York, gold closed at $622.Silver was quoted late yesterday at $33.30 an ounce in New York. In Frankfort, the dollar rose to 1.7585 marks from 1.7455.

Financial markets generally have been battered by a growing expectation that the economy will remain stronger than expected in 1980, instead of dropping into a recession, and that inflation will be even worse than predicted. A week ago the Labor Department said prices charged by producers of finished goods jumped 1.6 percent in January, and yesterday reported consumer prices rose 1.4 percent for the same month.

Leon Gould, an economist for Commerical Credit Corp. of Baltimore, said the prime rate hikes were "just one step in a long march for interest rates. We're not close to the top in interest rates by any stretch of the imagination."

Other analysts were less categorical, but few were willing to suggest rates will not move higher. Most simply professed total uncertainty about what is in store.

After the markets closed, the Federal Reserve reported the money supply declined in the week ended Feb. 13. The measure of money known as M-1B, which includes coin and currency in circulation and all checking deposits at commercial banks and thrift institutions, dropped by $300 million to $392.8 billion. [Tables on Page D13.]

Meanwhile, the New York Federal Reserve Bank said commercial and industrial loans on the books of the nation's large banks rose $1.2 billion in the week ended Feb. 13, compared with a $1 billion gain the previous week.

Some of the banks raising their prime rates yesterday cited strong loan demand as one reason for their action. Financial analysts, such as economist Henry Kaufman of Salomon Brothers, expect the chaotic conditions in the long-term bond market to force many would-be borrowers to turn to commercial banks for loans for shorter periods.

One of the most frequently cited reasons for the surge in interest rates is the widespread expectation that federal budget deficits will be much larger than officially estimated by the Carter administration last month. Large increases in defense spending, beyond the sizeable additions in the budget, are part of this expectation.

Charles Schultze, chairman of the Council of Economic Advisers, said in a speech in Miami yesterday, "While the recent behavior of long-term bond markets stems from many causes, there is little question but that the 'defense boom' syndrome has played an important role.

"I believe that these fears are basically groundless," he declared. Schultze explained the events in Iran and Afghanistan that have led to the "defense boom" notion are unlikely to result in any economically significant additions to defense spending.

But if modest increases beyond those already planned are needed, Schultze continued, "we are determined to do everything possible to make sure that economies are made elsewhere, so that the total budget is not increased."

Financial markets will have to be convinced Schultze is right, analysts said, before the latest surge in interest rates levels off.