Mazza Gallerie, a relatively new Northwest Washington bastion of upper income retail shopping in Friendship Heights, is reliably reported to be under contract to be sold for more than $25 million to a Washington group of builder-developers.

Owned by a subsidiary of Exxon Corp. and the Olga Mazza family at the time of the its long-delayed construction in the mid-1970s, the 272,000-square-foot complex of 50 varied stores, was opened late in 1977 with Neiman-Marcus, a long-term tenant, as the principle retail anchor.

In the past year the Gallerie has become 90 percent leased and has experienced an upturn in both customer traffic and dollar volume, according to a spokesman for the sellers.

Gallerie Associates, the purchasing group that is expected to go the settlement in August, includes veteran builder-developer Howard Polinger, who owns other Chevy Chase area properties; the Artery Organization, a residential construction firm that is headed by Henry Goldberg, Alan Geller and Jack Luria, and also Robert Keats and Bernard Segerman, who are active in real estate brokerage and construction.

Less than two years ago, a spokesman for Exxon Corp. acknowledged "inquiries to which we have responded" about selling the landmark Gallerie property that had been plagued by construction delays and got off to what most retail observeers regarded as a slow start. Leasing and management of the Gallerie were shifted to Coldwell Banker about a year ago and several new tenants have been obtained, including F.A.O. Schwartz, Ted Lapidus and Williams-Sonoma. A "high decor" McDonald's is one of the 44 stores in the complex.

Located on an two-acre tract at Wisconsin and Western Avenues NW, the four-story, marble building was built with scant fenestration on land owned for years by the Olga Mazza family. John E. Walsh Jr., vice president of HSL-DC Corp., the owning group, said that Mazza and other interests had been acquired recently by the Exxon subsidiary in anticipation of a sale. It was learned that the property had been offered selectively in the past six months by Coldwell Banker, a national real estate brokerage frim representing the ownership.

Although details of the impending transaction were grudingly divulged yesterday, it was learned that the interest of the Washington purchasing group in the property was based on confidence in property values in the area and in future success of this retail complex now leased to stores ranging from fashions to quality cookware and from toys and French antiques. About 50,000 square feet were leased in the past year. Three small original stores closed their doors earlier at the Gallerie.

Neiman-Marcus, which has announced plans to open a second store in this area, has options for a 99-year lease at Mazza. Neiman has consistently discounted reports of some disappointment with customer reponse at the Gallerie, which has been somewhat isolated by Metro construction since its opening.

In addition to the big Neiman-Marcus store that occupies 124,000 square feet in the Gallerie, Raleigh's haberdashery firm is the second largest user of retail space. Raleigh's recently added windows to its store.

The distinctive Mazza building was designed by the architectural firm of John Carl Warnecke. It is located in a business area at the boundary of the District line and suburban Maryland, where numerous stores, apartments, hotels and office buildings have been constructed in the past two decade. Woodward & Lothrop has modernized its nearby store in Friendship and Lord & Taylor has had a large store there for more than a decade.

When Metro service begins, the area is expected to increase its economic impact and lose some of the auto traffic that has caused increasing congestion in recent years.