1 Exhibit 5.1 July 31, 1998 Anergen, Inc. 301 Penobscot Drive Redwood City, California 94063 RE: REGISTRATION STATEMENT ON FORM S-8 Gentlemen: We have examined the Registration Statement on Form S-8 to be filed by Anergen, Inc., a Delaware Corporation (the "Company"), with the Securities and Exchange Commission on or about July 30, 1998 (the "Registration Statement") in connection with the assumption pursuant to Rule 414 of the Securities Act of 1933, as amended, by the Company of certain Registration Statements on Form S-8 filed by the Company's predecessor, Anergen, Inc., a California Corporation ("Anergen California"), relating to shares of Common Stock of Anergen California reserved for issuance under the certain stock plans (the "Plans") of Anergen California. We understand that the Plans have been assumed by the Company and that in accordance the terms of the Plans, the Company has reserved shares (the "Shares") of Common Stock of the Company for issuance pursuant to the Plans. As your counsel, we have examined the proceedings taken and are familiar with the proceedings proposed to be taken by you in connection with said issuance and sale of the Shares pursuant to the Plans. It is our opinion that, upon completion of the proceedings being taken or contemplated by us to be taken prior to the issuance and sale of the Shares pursuant to the Plans, and upon completion of the proceedings being taken in order to permit such transaction to be carried out in accordance with the securities laws of the various states where required, the Shares, when issued and sold in the manner referred to in the Plans and the Registration Statement, 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 the prospectus constituting a part thereof, and any amendments thereto. Very truly yours, WILSON SONSINI GOODRICH & ROSATI Professional Corporation /s/ Wilson Sonsini Goodrich & Rosati --------------------------------