After almost two years of trying, Ireland's Guinness Corp. seems to be carving out a niche for its Guinness Gold in the cutthroat U.S. beer market.

Yet the Irish lager is in a race against 400 other foreign contenders - including the brands of major Continental brewers like Heineken and Beck's.Guinness already is represented in the American market by such brands as Stout, Harp and the non-alcoholic Kaliber. The firm also imports Bass ale from Britain.

"Our first task is to underscore the obvious: This is a lager not a stout," said Declan Maguire, group marketing manager at Guinness Imports, Stamford, Conn.

And what does Guinness regard as its target audience? "The market we aim at is the legal-drinking-age-to-30 crowd - call them yuppies if you like," Mr. Maguire said.

St. Patrick's Day, March 17, is the biggest day of the year for beer consumption in this country, and Guinness products have their peak sales in March. In the run-up to the holiday, Guinness sponsors Irish night festivities at bars and clubs.

Despite the plethora of imported beers, foreign brews account for just 5 percent of U.S. consumption. New York alone takes 17 percent of all beer imports.

Guinness sold 100,000 cases of Gold in 1988 and boosted sales of the brand to 300,000 cases last year, according to Impact magazine, which covers the beer industry. The company is aiming for a 50 percent jump in Gold sales in 1990, Mr. Maguire said.

Among this country's top 50 imported beers, Guinness Stout ranks 12th, with 2.2 million cases sold in 1988, while Gold ranks somewhere in the 40s.

The company declined to provide financial statistics on Gold or Stout sales.

Product advertising, estimated at $2 million a year by industry insiders, has yet to overcome the perception that anything Guinness must be the venerable Stout.

Lauren Frank, an account executive at Kirschenbaum and Bond Advertising, observed: "Guinness Gold is almost always confused with Stout. That's why our current ads stress the obvious differences between them."

Building on the Guinness base has both advantages and disadvantages, said David Pardus, sales planning manager. While Stout is sold nationally, Gold is targeted at nine Northeastern states with 3,500 outlets, including bars and stores.

"There is a long-term goal to build the core franchises in the Northeast," Mr. Pardus said.

John Koller, director of Phoenix Beverage, a New York distributor, commented: "Gold profits inherently by being Guinness."

The key, he said, is for Guinness Gold to establish and hold a niche among some very tough contenders.