Gap is preparing to roll out a line of athleisure wear for men who are willing to pay more for clothes that can go from the gym to the grocery store — or even the office on casual Fridays.

The retailer, which also owns Banana Republic and Old Navy, is launching its premium activewear brand called Hill City in mid-October. It's a male version of its women's Athleta line, which is known for its yoga pants, leggings and versatile sweaters that go with women's outfits from day to night, rivaling Lululemon.

Sales of Gap's namesake brand have been lagging analysts' expectations, forcing the retailer to look for growth in new formats. Gap's shares are down about 20 percent this year, bringing its market cap to roughly $10.5 billion.

Hill City will initially sell on its website, although some items will also be displayed in about 50 Athleta stores around the country, Hill City General Manager Noah Palmer told CNBC. The Gap currently offers men only less-expensive athleisure options such as running shorts, hoodies and T-shirts through the Gap and Old Navy brands.

"This line is something that Gap has been thinking about for a while," said Palmer, a former Major League Soccer player and most recently head of Gap's Old Navy men's business. Activewear is the "biggest and fastest growing" category in the men's space, he said.

In 2017, activewear apparel sales increased about 2 percent to $48 billion, representing roughly 22 percent of total apparel industry sales, according to NPD Group, a market research firm. Driving that growth was primarily greater sales of women's athleisure merchandise, NPD said. More and more retailers are trying to figure out how to target men.

Lululemon is one example of a company that's succeeded, over the course of a few years, in building a cult-like following of female shoppers for its yoga pants and sports bras. Just recently, it vowed to make the same push with men's items, predicting $1 billion in sales by 2020.

Gap has not broken out sales figures for Athleta, which opened its first flagship store in 2011, but CEO Art Peck has said the brand is "highly accretive" to overall earnings. The company is planning to open more Athleta and Old Navy locations as it shutters some under the Gap and Banana Republic banners. And the company wouldn't count out opening stand-alone Hill City stores in the future.

When describing his goals for the new Hill City brand, Palmer said: "There is a lot of really good, technological high-performance stuff on the market that we don't think looks good. Our wish is to bridge that gap and build, essentially, a small closet for ourselves that looks how we want to look. Something that's high-performing but where form meets function."

Shoppers should be able to shop the brand regardless of which sport or activity they need clothing for, Palmer said. "A lot of our items are multipurpose."

The line will include items like an "Everyday Supima Tee" for $38 and an "Everyday Tech Pant" for $98, along with a Sherpa jacket that retails for $148.