Clothing giant Gap (NYSE: GPS) announced first-quarter earnings, and things are looking good. While we're not talking "public dancing/stranger high-fiving" good, they certainly aren't bad. The company has been reworking its branding over the past year and it looks like that work is finally paying off.

Skinny jeans and widening margins
In headline news, Gap increased revenue by 6% in Q1 2011, pulling down $3.5 billion this year. In a sign of overall corporate strength, the Banana Republic and Old Navy sub-brands increased revenue as well. The two biggest players were the Gap brand and Old Navy. Those divisions combined to account for 77% of total Gap revenue in Q1.

While everybody was up, the improvement at the Gap division was clearly the most important. Not only did overall revenue improve 4%, the vastly higher-margin direct-to-customer channel grew 15%. Direct sales brought in $110 million for the Gap brand, representing 8% of total Gap brand revenue.

Across the entire company, direct-to-customer sales grew 18% compared to 2011. That move helped increase gross margins to 39% in Q1. This is good news for the company, which struggled along with the rest of the retail world in Q4 last year when discount-mania hit their bottom lines like a player piano from a passing plane.

Over the holiday quarter, continued discounting squeezed gross margins down to 36%. Other retailers like Aeropostale (NYSE: ARO) haven't been able to relieve the pressure. The company saw its gross margin drop down to 28%, a percentage point off of 2011. Even this compressed level is a step up from the holidays, though. Aeropostale suffered in Q4, managing measly 24% gross and 3% net margins.

All in the brand
Gap has had a difficult time of things in the past ten years. The company used to define "cool," but the rise of Urban Outfitters (Nasdaq: URBN) and Abercrombie & Fitch (NYSE: ANF) has turned the heat up a bit. The company also suffered during the recession, and revenue has yet to rebound to the 2007 level.

But Gap has a new plan. According to a recent report from The New York Times, the company is taking the drastic step of actually fixing up some of its run-down stores. Apparently people like to shop in clean, well-lit, freshly painted stores.

In slightly more forward-thinking news, Gap is also trying to manage its inventories and supplies more tightly. Total inventory levels dropped in Q1 compared to last year. The company is also consolidating U.S. and international designs, and investing in tech to increase the speed at which it can react to trends. For five years Gap has been chasing the last hot thing instead of creating it themselves.

The future of Gap
Gap's stock has done well this year, as the company redefines itself as its old self. Shares are up over 40% in 2012 and even with a small knock-back after the earnings release, things are looking up. For a long time I've shied away from Gap due to its increasing irrelevance in the fashion world. But it's looking like 2012 will be the year that the brand finally makes something of itself again.

Gap isn't the only company that's undergoing a revolution. Brand is important across the entire retail world, and the Fool's special free report on the future of retail covers two stocks that have incredible brand strength and business ambitions. Get your free copy today and get in on these two great recommendations.