Gap: Sterne Agee's 'top pick' for the second half

Merchandise misses and a shopper base that would rather spend money on the latest tech gadgets have caused sales to slump at the Gap brand this year. But Sterne Agee on Tuesday said it thinks the namesake label—and its parent company—are about to turn a corner, naming the retailer its best idea for the second half.

Analyst Ike Boruchow wrote in a note to investors that leaner inventories, easier sales comparisons during the back half of the year, and a better assortment at Gap will act as key drivers. Favorable weather should also increase demand for the company's fall merchandise, while cheaper cotton prices, which affect Gap more than other retailers, will benefit its bottom line.

"Their business is getting better," said Boruchow, who has a $52 price target and a "buy" rating on the stock. "I think it's compelling."

Read MoreGap to open 40 stores in India

For one, Gap's sales comparisons get "meaningfully easier" starting in the third quarter, Boruchow said. While it's been up against mid-single digit comparable-store sales gains over the past 12 months, it recorded same-store sales growth of just 1 percent in the back half of 2013.

Getty Images

Aside from this lowered bar, a number of the retailer's internal initiatives should give it a boost in the third and fourth quarters, Boruchow said. For one, he expects a sales inflection to come from the Gap brand, which has seen same-store sales decline 5 percent so far this year. But heading into the fall, Gap's floor set will for the first time feature merchandise from the brand's new merchandise and design team.

This could have a significant impact on the company's sales, as the label has been its Achilles' heel in 2014. Banana Republic's "once lagging women's business appears to have turned the corner," while the lower-priced, on-trend Old Navy is "firing on all cylinders."

"With new head merchant Michelle DeMartini having been able to assist designer Rebekka Bay for a cohesive fall assortment, an improvement in the merchandise could reverse the fortunes of this struggling brand," Boruchow said.

Read MoreLess bad is good enough for teen retail—for now

He also noted a number of factors should help the company improve its margins. Among them: Cotton prices that are 20 percent lower compared to the prior year, and changes to its supply chain that will lessen the need to buy bulk inventories ahead of the season. Cutting back on inventory buys made months in advance should help cut back on markdowns.

Favorable weather conditions, trimmed inventories and its reserve in-store capability should also give Gap a boost, Boruchow said. What's more, he predicts the company's online business could nearly double over the next five years to account for 20 percent of sales.

Still, the retailer faces headwinds. One of the biggest obstacles for apparel retailers has been the absence of a must-have trend, meaning consumers would rather save up for Apple's upcoming iPhone or spend on other tech gadgets.

Read MoreHere's the bright spot in a tough retail quarter

But specifically for Gap, Jefferies analyst Randal Konik, who has a "hold" rating and a $40 price target on the company, said he doesn't expect its margins or sales—and therefore, its shares—to see a boost until 2015.

"We believe the merchandise is improving, but is not quite there, yet," he said.

Gap shares were slightly higher in afternoon trading, near $46.

—By CNBC's Krystina Gustafson.