THIS can’t be a Gap: the mannequins look kind of happy.


And the paint looks fresh, the fixtures intact. Over here are pink and yellow jeans for women; over there, bright spring-fresh scarves. Upstairs is some cool-looking men’s denim. And, throughout, natural light chases away the usual drab florescence.


Yet this is a Gap — at the Grove, an upscale mall in Los Angeles. Only it’s more than a Gap — it’s a laboratory for reviving the brand, one of the great hot-to-not stories of American retailing.


After defining 1990s khaki culture, Gap fell hard in the early 2000s. Management missteps, executive turnover and, not least, unappealing fashion punished sales. It was a remarkable comedown for a chain that once seemed to dictate how America dressed.


The chief executive of Gap Inc., Glenn Murphy, has tried to satisfy Wall Street by cutting costs and closing stores. But sales last year were about where they were in 2002, despite big pushes overseas and online. (While Gap is the marquee brand, the company also owns Old Navy, Banana Republic, Piperlime and Athleta.)


What went wrong? Dozens of interviews with current and former executives depict a company that chased after rivals, rather than charting its own course, and that cut quality and lost touch with customers. Simply put, it filled its stores with stuff that people didn’t want.


Which is why what’s happening at the Grove is so crucial. On a Tuesday in March, Art Peck, the president of Gap North America, surveyed the scene and liked what he saw. “If you drop someone in here and say, ‘What store are you in?,’ nobody would say the stereotypical Gap store,” Mr. Peck said.


That, he implied, is a good thing. Mr. Peck wants to update Gap’s more than 1,000 North American stores.


At the Grove, Gap is testing ways to build sales. The cheerier surroundings are a start. It’s also trying dressing rooms in the center of the store, and an on-site stylist. Other Gap stores are being spruced up, too, and, as Mr. Peck put it, Gap is “making sure our body forms all have the appropriate number of limbs attached to them.”


The new clothes reflect Gap’s upbeat, “Be Bright” advertising campaign. And as those products hit the stores, Gap is getting a bit of good news. In February and March, same-store sales shot past analysts’ expectations. The share price of Gap Inc., the parent company, is clawing its way back, too. It had plummeted from $53 in February 2000, when Gap’s dot-com-era khaki was burying its rivals’ more formal business wear, to $9.50 in November 2008, at the height of the financial panic. On Friday, it closed at $28.53, up nearly 54 percent so far this year. “We really believe we have a diamond, and we just need it to be polished properly,” Mr. Murphy says.


IT’S hard to overstate Gap’s place in American retailing.


When Doris and Don Fisher founded the company in 1969 in San Francisco, they basically invented the specialty apparel store. Gap sold Levi’s in a bunch of sizes, aimed at the generation gap — hence the name.


When Millard S. Drexler arrived as chief executive in the ’80s, Gap began selling its own clothes. Gap Inc. expanded Banana Republic, bought Old Navy, and went on to dominate American clothing retailing for almost two decades. But by 2002, breakneck expansion caught up with it. The company was close to bankruptcy, and Paul Pressler, a Disney executive, was brought in as C.E.O.


Yet by then, rivals like Zara and Juicy Couture were challenging Gap’s all-things-to-all-people approach. In 2007, Mr. Pressler stepped down and, according to someone familiar with the matter, a board representative reached out to Mr. Drexler, who by then was running J. Crew. Would he return if Gap bought J. Crew? he was asked. Nothing came of it.


Bill Chandler, a Gap spokesman, says that if this happened, it did not represent the board’s point of view.


Gap’s board would choose Mr. Murphy, then the head of Shoppers Drug Mart in Canada, as the new chief.


Worn down, Gap executives waited to hear the new boss’s plan.


“It wasn’t like he came in and was like, ‘It’s all about beautiful product and the right marketing’ — there was none of that,” recalls Will Hunsinger, former general manager of Gap’s online unit. “It was, ‘We’ve got to learn how to work more efficiently.’ ”


Mr. Murphy set about cutting costs, closing stores and pushing international growth. And on some fronts, the strategy showed results. Gap is growing fast in China and elsewhere, and Gap Inc. is still making money: profit was $1.1 billion in 2009, $1.2 billion in 2010, and $833 million in 2011, in the same range as in the middle of the last decade.


But he largely left the fashion side of Gap alone. When clothes didn’t sell, he focused on market-share strategies rather than on trying to rethink what Gap was about. Some executives found this approach lacking.