YORK, PA. -- President Reagan will visit here this week to honor an American company that climbed from the trenches of near-financial ruin and put aside the shield of protectionism to take on foreign competitors.

The company is Harley-Davidson Inc., the only U.S.-based manufacturer of big motorcycles -- the kind made famous by the infamous Hell's Angels; the kind featured in movies such as "Easy Rider" and "The Wild One;" the kind almost wiped out by Japanese brands five years ago.

Harley-Davidson officials complained back then that the Japanese were flooding the U.S. market with big motorcycles -- deliberately overproducing to build up gigantic inventories of the bike to be sold later at cut-rate prices.

The U.S. company appealed to the International Trade Commission to impose stiff tariffs on big foreign bikes, an action that the Reagan administration took in April 1983.

Thus protected, Harley-Davidson officials proceeded to cut manufacturing costs, improve management and product quality, and recapture lost market share.

The story could have ended there. But Harley-Davidson officials went one step further. In an unprecedented move this year, they asked the ITC to drop the tariffs that saved their corporate lives.

"We no longer need the special tariffs in order to compete with the Japanese," a triumphant Harley-Davidson Chairman Vaughn L. Beals told a Washington news conference.

"We've taken a company that had been driven to the brink of disaster by our Japanese competitors' predatory practices, and transformed it into a company that is not only financially viable, but a market leader as well," Beals said.

Beals' scrap-the-tariffs request could not have come at a better time for the Reagan administration, which is battling increasingly tough odds to hold down rising protectionist sentiment and legislation on Capitol Hill.

And so, the president is coming to this southeastern Pennsylvania town to visit one of the two Harley-Davidson plants producing the thunderous motorcycles, some of which have engines as big as those in small cars.

There will be speeches and plant tours and posing for photographs. There will be lots of reporters and pundits. And there will people like Harry Smith, a 36-year-old working man and union leader, who has put 17 years into the plant.

"I don't know much about politics and I really don't care about it either," said Smith, president of Local 175 of the International Association of Machinists, which represents 923 production workers at the sprawling Harley-Davidson facility here.

"I do know that the tariffs helped to slow up the imports, and that that helped us keep our jobs," Smith said.

"But the backbone of our comeback as a company is our people here," Smith said. "They have a lot of skill and craftsmanship and they went through a lot of hardship to get the company where it is today," he said.

But despite the recent success, doubts remain.

In fighting its way back, Harley-Davidson imposed layoffs that reduced the Milwaukee-based company's national payroll from 3,800 in the early 1980s to about 2,200 today. Here, the work force is down to about 1,100 people, compared with an estimated 1,800 at the end of 1982.

Much of Harley's comeback is attributed to the use of "quality circles" and other employe-involvement programs, as well as statistical quality control and just-in-time inventory procedures -- all of which have been used by automotive and other U.S. manufacturing companies trying to regain the competitive edge. But just as General Motors is beginning to meet employe resistance to those programs, it's also showing up here.

Kenny Anderson, a union official and electrical maintenance worker, said, for example, that he was "all for" the quality circles in use at the York plant when it was in trouble. But he said now the quality circles seem to have veered away from their original purpose, and have become institutionalized as a way of keeping the pressure on workers.

Also, other workers point out that even though their sacrifices, combined with the tariffs, have helped to save the firm, there still seems to be no guarantee that they won't lose jobs. Said worker Red Bixler: "They can't convince me that the only reason they want to streamline jobs is to reduce production costs. Every time we reduce production costs we also seem to reduce the number of workers.

"I'm not worried about our ability to compete on the basis of skill. The people here always have had the skill and the will to do a good job, even before the company started getting its act together in 1983," said Bixler.

If Harley-Davidson falls victim to motorcycle imports again, the company might not care, Bixler said.

"Harley is more than a motorcycle company nowadays," said Bixler, echoing a sentiment often expressed by Harley-Davidson officials themselves. In fact, Bixler's own job, inspector on Harley-Davidson's "bomb line," which produces bomb casings -- so-called practice bombs -- for the Defense Department, is an example of the company's efforts to diversify its earnings base.

Another example is Harley-Davidson's $155 million acquisition last year of Holiday Rambler Corp., a major recreational vehicle manufacturer based near Elkhart, Ind.

Harley-Davidson put up $35 million in cash for Holiday Rambler and borrowed the rest. The expense of the acquisition, coupled with stagnant sales and a slow-growth motorcycle market, put a big dent in Harley-Davidson's 1986 earnings.

The motorcycle company had profits of $4.9 million (93 cents a share) last year on sales of $295.3 million, compared with earnings of $10 million ($2.71) on sales of $287.5 million in 1985. An estimated 11.7 percent, $34.5 million of Harley-Davidson's 1986 sales, came from defense and commercial contracts -- with more than 95 percent of the contract awards coming from defense.

Company officials say they have no intention of abandoning the core motorcycle business that started Harley-Davidson rolling in 1903. Instead, the company is depending on continued success in the motorcycle market to fund its movement into other businesses, Beals said.

Harley-Davidson modernized its entire motorcycle product line and improved its manufacturing and marketing processes in the past four years, Beals said. The company, moribund under the 12-year ownership of AMF Inc., which ended in 1981, has undertaken one of corporate America's "most successful revitalization programs," Beals said.

Harley-Davidson now occupies second place in the U.S. heavyweight motorcyle industry behind Honda of America, and has increased its market share in that segment from a low of 12.5 percent in 1983 to 19.4 percent last year, "a level we haven't enjoyed since 1979," Beals said. Exports of the big Harley Hogs are also up, having risen 45 percent from the company's 1983 levels and now accounting for 19 percent of Harley-Davidson's worldwide motorcycle sales. By comparison, exports made up 13 percent of the company's motorcycle sales in 1983.

Those incremental victories put Harley-Davidson in position to go public in July 1986, starting first with an offering of 1.43 million shares and $50 million in notes.

The highly favorable response to that initial stock offering encouraged the company to increase the package to 2 million shares and $70 million in notes.

Capital gained from that offering allowed Harley-Davidson to pursue its diversification strategy, Beals said. And that new strategy, along with Harley's restoration to "market leadership" in the motorcycle business, means "we have no further need for special tariff protection," Beals said.

"We're sending a very strong message to our competitors and to the international industrial community that U.S. workers, given a respite from predatory import practices, can become competitive in a world market. Harley-Davidson is proof of that," Beals said.

Smith, Bixler and other Harley-Davidson workers interviewed here said they will join Beals and Reagan in celebrating the turnaround.

"Any time a president of the United States takes out time from his busy schedule to visit a company, it's an honor," said Kenny Anderson, a local 175 official and electrical maintenance worker at the York plant.

"Harley-Davidson couldn't buy the kind of publicity it's going to get from this visit," Anderson said. "If the president's coming to this plant focuses attention on our motorcycles, it helps to make all of our jobs here more secure." Bixler agreed. But he said he has one request of the president: "Ask him if he can do something to help the people who are about to be laid off on the bomb line," Bixler said.

"We got about 130 people working on that line, but the government contract is about to give out in a month or so. That means we're going to lose about 80 people, because there's not enough work on the motorcycle side to take care of all of them.

"Ask the president if he can do something about that," Bixler said.