Gap Inc (GPS.N) reported a surprise quarterly profit on Thursday on demand for dressier clothes at its Banana Republic brand, while an…