Sherwin-Williams Co., the venerable giant of the paint and chemicals industry that was at death's door four years ago, is convalescing rapidly after a management housecleaning and is about to become a major economic presence in the Washington metropolitan area.

With its impending acquisition of Cleveland-based Gray Drug Stores, Sherwin-Williams will become the parent company of Drug Fair. In addition, Sherwin-Williams is planning to expand its own network of retail paint and home-decorating stores in Washington's Maryland and Virginia suburbs.

"We view Washington as a growth metropolitan market, a good market," said Carl Bellini, president and general manager of the company's stores division. He said the Washington-area market could support "about double" the 13 retail stores that Sherwin-Williams currently operates, and "you can take that as a statement of intent."

Bellini and John G. Breen, Sherwin-Williams' chairman and president, said in a joint interview that the drug store acquisition and the marketing plans for the retail paint stores were not related to each other and that the company does not intend to mix the two lines of business. They said acquisition of Gray Drug represents the first phase of Sherwin-Williams' diversification strategy, and the drug stores will continue to be operated as specialty stores, separate from the paint and wallpaper outlets.

Sherwin-Williams is the world's largest manufacturer of paints and varnishes. In addition to its own brand -- the paints that "cover the earth," according to the familiar emblem that the company recently revived -- Sherwin-Williams recently acquired Dutch Boy, and also manufactures Martin Senour brand paints and private-label paints for other retailers, including K mart and the Washington area's Hechinger stores.

Despite sales of more than $1 billion a year, however, Sherwin-Williams was losing money in the late 1970s, omitted its dividends and seemed destined if not for collapse at least for a takeover by another organization. "We were on the brink of insolvency," Breen said. "We lost our credit rating. We couldn't sell our commercial paper. We lost credibility."

Trapped in antiquated plants, with the cost of raw materials rising and the 1,400-outlet stores division going down in a $30 million red ink bath, the 115-year-old company was as unimpressive as its dingy downtown headquarters here. The directors called in Breen in 1978, and by all accounts he has engineered a remarkable turnaround.

A vigorous cost-cutter, Breen swept out nearly half the company's top executives, instituted cash-management and inventory controls, accelerated bill-collection and decelerated payouts, and developed a long-range corporate strategy for the first time.

"I didn't see any problems that had not been created by human hands or human minds, so I didn't see anything that couldn't be fixed, given the time to fix it," Breen said. He said he hired a vice president for corporate planning, whose assignment was "to identify things we should acquire and also things we should divest, if necessary, start a corporate planning process, tell us where we're going with the damn thing and how to get there."

One result of that process was the decision to move outside the company's traditional paint and chemical businesses into new ventures. Breen said that the market for house paint is shrinking because of the slump in construction and the decline in sales of existing homes, so Sherwin-Williams was looking for opportunities to diversify.

Enter Gray Drug, seeking a "white knight," or friendly suitor, to fend off an unwanted takeover attempt by National City Lines of Dallas. Gray approached Sherwin-Williams, which then agreed to purchase all of Gray's stock at $21 a share, which would amount to $55 million. "We couldn't find any reason not to," Breen said. "It's a good opportunity."

Gray operates about 360 drug stores, including the Drug Fair units. Though profitable, it has been regarded as a drab and unexciting operation in need of some new direction. Gray reported earnings of only $61,000 on sales of $99.8 million in the quarter that ended Aug. 1.

Breen said acquisition of the drug chain "gives us in excess of $1 billion a year in direct consumer sales" when the drug stores and paint stores are taken together. "It's steady," he added, "it does not consume a tremendous amount of cash, it is a very solid business, the kind of business you have to have in hard times."

Citing Bellini's experience as vice president for operations at Family Dollar Stores of North Carolina, Breen said of Gray, "Where they are weak, we will strengthen them. Where they are stronger than we, we'll learn from them. Carl ran Family Dollar stores. You tell me the difference between Family Dollar and Drug Fair. Bloody little, except for the pharmacy."

Breen and Bellini said their objective in the retail paint and decorating stores, in addtion to expansion in selected markets, is to increase the percentage of do-it-yourself customers. Breen said about two-thirds of all sales in the Sherwin-Williams stores now are to painting contractors, and "we are trying to improve the mix."

What Sherwin-Williams does not intend to do -- either through the drug chain or through its retail paint stores -- is to compete with Hechinger in the general home-repair, lumber and hardware business, Bellini said.

Sherwin-Williams reported earnings of $24.8 million on sales of $1.2 billion last year, up from earnings of just $5 million on sales of $1.1 billion in 1978 after a loss in 1977. Dividends, omitted in 1978, were 60 cents a share, and the ratio of debt to equity was down to 43 1/2 percent from 48.6 percent two years before. In the first six months of 1981, sales were at an annual rate of $1.4 billion, and the most recent quarterly dividend was 20 cents a share.

That performance has drawn good reviews from financial analysts. "Breen has done a sensational job," said Stanley Schwartz of Oppenheimer & Co. He said the company would benefit from the acquisition of Gray Drug because "the paint business is highly cyclical, with sales concentrated in spring and summer. In general retailing, you can reduce seasonality."

"There is no question they have done a masterful job of turning the company around in this economy," said Timothy L. Jones, who monitors Sherwin-Williams for Dean Witter Reynolds. He said he was "mildly positive" about the drug store acquisition, despite Gray's lackluster performance, because "Gray sells at Christmas; you can reduce the seasonality of the business." With Gray in the corporate fold, Sherwin-Williams should have sales of about $2 billion overall next year, Jones said.