Shares of Gap Inc. rallied after hours on Thursday after the clothing chain offered a more upbeat full-year outlook, saying that strong momentum in most of its stores has set it up well for the holiday shopping season.