WILSON SONSINI GOODRICH & ROSATI Professional Corporation 650 Page Mill Road Palo Alto, California 94304-1050 Telephone 650-493-9300 Facsimile 650-493-6811 www.wsgr.com April 13, 1999 The Gap, Inc. One Harrison Street San Francisco, CA 94105 Re: The Gap, Inc. Registration Statement on Form S-8 Ladies and Gentlemen: At your request, we are rendering this opinion in connection with the proposed issuance pursuant to The Gap, Inc. 1999 Stock Option Plan (the "Plan"), of up to 15,000,000 shares of common stock, $0.05 par value ("Common Stock"), of The Gap, Inc., a Delaware corporation (the "Company"). We have examined instruments, documents, and records which we deemed relevant and necessary for the basis of our opinion hereinafter expressed. In such examination, we have assumed the following: (a) the authenticity of original documents and the genuineness of all signatures; (b) the conformity to the originals of all documents submitted to us as copies; and (c) the truth, accuracy, and completeness of the information, representations, and warranties contained in the records, documents, instruments, and certificates we have reviewed. Based on such examination, we are of the opinion that the 15,000,000 shares of Common Stock to be issued by the Company pursuant to the Plan are validly authorized shares of Common Stock and, when issued in accordance with the provisions of the Plan, will be legally issued, fully paid and nonassessable. We hereby consent to the filing of this opinion as an exhibit to this Registration Statement on Form S-8 and to the use of our name wherever it appears in the Registration Statement. In giving such consent, we do not consider that we are "experts" within the meaning of such term as used in the Securities Act of 1933, as amended, or the rules and regulations of the Securities and Exchange Commission issued thereunder with respect to any part of the Registration Statement, including this opinion, as an exhibit or otherwise. Very truly yours, /s/ WILSON SONSINI GOODRICH & ROSATI WILSON SONSINI GOODRICH & ROSATI Professional Corporation