When Gulf Oil Corp. announced last Friday that it had dropped its $5.13 billion bid to buy Cities Service Co., hearts sank at a number of Wall Street firms that had bought Cities Service stock at prices as high as $56 a share in hopes of selling it to Gulf for $63.

The so-called risk arbitragers, the high-stakes players who gamble on making money in takeover attempts, had bought about 15 million Cities Service shares at a price averaging roughly $53 a share, according to well-informed securities firm officials, all of whom asked to be unidentified.

Until Gulf started to get cold feet last week, risk arbitragers at those 40 or so firms stood to make, in total, about $150 million on the Cities Service takeover. Instead, at least on paper, they have lost $375 million. The stock that Gulf said it was willing to pay $63 for stock that dropped to $30 3/8 yesterday on the New York Stock Exchange. Analysts said, however, that Cities Service's defensive moves begun yesterday could in time boost the price 10 points or more.

Risk arbitragers play a simple game. They buy stock in a company that is (or they think will be) the target of a takeover attempt and hope to sell the stock to the acquiring company for a higher price. They run the risk that the takeover attempt will not be made or that it will be unsuccessful. If that happens, they are stuck with high-priced stock, like Cities Service, whose market price plummets.

"There are various types of arbitrage. The nomenclature here is 'risk' arbitrage. The Cities Service-Gulf deal shows you why the term applies," said the top officer of a firm that specializes in risk arbitrage.

"In this business you live by the sword and you die by the sword," said Alan C. Greenberg, senior partner of the big brokerage firm Bear, Stearns Inc., one of the firms that bought Cities Service stock.

Although Wall Street is wringing its hands, the thousands of investors--both individuals and institutions--who sold to arbitragers at $53 rather than taking the risk and waiting for Gulf's $63--are winners.

In recent years securities firms have increased their risk arbitrage departments because of their desire to develop new ways to make money and because of the growing number of mergers--including several record ones last year.

Perrin Long, who covers securities firms for Lipper Analytical Distributors, said arbitragers are like gamblers. "You're using the firm's money to buy and sell where you think there are opportunities to make money."

These risk takers often hedge their bets by purchasing an "option" contract whose value increases if the price of the stock falls. But regulations do not permit an individual or firm to own contracts representing more than 200,000 options. Several firms have more than 1 million Cities Service shares, one arbitrager estimated. Long estimates several firms will lose $4 million to $6 million in the end.

Professional risk takers have been important factors in the success or failure of recent mergers.

For example, arbitragers never believed Mobil Oil would succeed in its attempt to take over Conoco Oil last year and most sold their stock to Mobil's competitors, Seagram and Du Pont, the latter being the eventual winner of the battle.

Recently, however, corporate merger activity has slowed. According to the industry trade group, the Securities Industry Association, at the end of March 1981, brokerage firms owned $1,058 million of stock they bought during takeover attempts. At the end of March 1982 those same firms had only $655 million.

One Wall Street arbitrager, although angry at Gulf for backing out of the deal, said he doubted the paper losses will be fully realized. Cities Service says it plans to either to find another merger partner or liquidate the company by selling its assets and remitting the proceeds to shareholders.

Although the professional risk takers stand to lose the most on the Cities Service deal, an unknown number of other investors--many of them individuals--bought Cities Service shares in hopes of making a profit. Many of these individuals will lose money.

The New York Stock Exchange said that for the last 10 days it has monitored member brokerage firms that had taken a position in Cities Service stock. "Nobody is in difficulty," a spokesman said.

Among the firms thought to have sizeable stakes in Cities Service are Merrill Lynch Pierce Fenner & Smith, Bache Halsey Stuart Shields Inc., Goldman Sachs & Co., Bear Stearns, Boesky & Co. and O'Connor Associates, a Chicago-based securities firm.

Some industry experts think O'Connor and Boesky each own as many as 2 to 3 million shares of Cities Service. Neither company returned reporters' phone calls yesterday.

Continental Illinois National Bank, whose list of problem loans has been growing apace during the current recession, is major banker of O'Connor's. The bank said it expects no losses from O'Connor's credit lines.