ISLAMABAD—Pakistan, often in the headlines for terrorism, coups and poverty, has developed something else in recent years: a burgeoning middle class that is fueling economic growth and bolstering a fragile democracy.

The transformation is evident in Jamil Abbas, a tailor of women’s clothing whose 15 years of work has paid off with two children in private school and small luxuries like a refrigerator and a washing machine.

For...