<PAGE>
                                                                     EXHIBIT 5.1

                [LETTERHEAD OF WILSON SONSINI GOODRICH & ROSATI]

                                August 18, 2004

Williams-Sonoma, Inc.
3250 Van Ness Avenue
San Francisco, CA 94109

         Re:      Registration Statement on Form S-8

Ladies and Gentlemen:

     We have examined the Registration Statement on Form S-8 to be filed by you
with the Securities and Exchange Commission on or about August 18, 2004 (the
"Registration Statement") in connection with the registration under the
Securities Act of 1933, as amended (the "Securities Act"), of an increase of
3,500,000 shares of your Common Stock, par value $0.01, reserved for issuance
under your 2001 Long-Term Incentive Plan (formerly known as your 2001 Stock
Option Plan, the "Plan").  As your legal counsel, we have examined the
proceedings taken and are familiar with the proceedings proposed to be taken by
you in connection with the sale and issuance of such Common Stock under the
Plan.

     It is our opinion that when issued and sold in the manner referred to in
the Plan and pursuant to the agreements which accompany the Plan, the Common
Stock issued and sold under the Plan will be legally and validly issued, fully
paid and non assessable.

     We consent to the use of this opinion as an exhibit to the Registration
Statement, and further consent to the use of our name wherever appearing in the
Registration Statement, including any Prospectuses constituting a part thereof,
and any amendments thereto.  This opinion may be incorporated by reference in
any abbreviated Registration Statement filed pursuant to Item E under the
General Instructions to Form S-8 under the Securities Act with respect to the
Registration Statement.

                                            Very truly yours,

                                            WILSON SONSINI GOODRICH & ROSATI
                                            Professional Corporation

                                            /s/ WILSON SONSINI GOODRICH & ROSATI

