Exhibit 5.1

|  |  |  | Gibson, Dunn & Crutcher LLP T: +1 415.393.4631 gibsondunn.com

February 10, 2026

Galecto, Inc.

75 State Street, Suite 100

Boston, MA 02109

Re: | Galecto, Inc.

Registration Statement on Form S-3

Ladies and Gentlemen:

We have acted as counsel to Galecto, Inc., a Delaware corporation (the “Company”), in connection with the preparation and filing with the Securities and Exchange Commission (the “Commission”) of a Registration Statement on Form S-3 (the “Registration Statement”) under the Securities Act of 1933, as amended (the “Securities Act”), relating to the registration under the Securities Act and the proposed issuance and sale from time to time pursuant to Rule 415 under the Securities Act, together or separately and in one or more series (if applicable) of:

(i) the Company’s debt securities (the “Debt Securities”);

(ii) shares of the Company’s common stock, par value $0.00001 per share (the “Common Stock”);

(iii) shares of the Company’s preferred stock, par value $0.00001 per share (the “Preferred Stock”);

(iv) warrants for the purchase of Debt Securities, Common Stock, and Preferred Stock (the “Warrants”); and

(v) units of the Company comprised of any combination of Debt Securities, Common Stock, Preferred Stock, and Warrants (the “Units”).

The Debt Securities, Common Stock, Preferred Stock, Warrants, and Units are collectively referred to herein as the “Securities.” The Debt Securities are to be issued under an indenture substantially in the form attached to the Registration Statement (the “Base Indenture”).

In arriving at the opinions expressed below, we have examined originals, or copies certified or otherwise identified to our satisfaction as being true and complete copies of the originals, of the form of the Base Indenture, form of the Debt Securities, specimen Common Stock certificates, and such other documents, corporate records, certificates of officers of the Company and of public officials and other instruments as we have deemed necessary or advisable to enable us to render these opinions. In our examination, we have assumed the genuineness of all signatures, the legal capacity and competency of all natural persons, the authenticity of all documents submitted to us as originals and the conformity to original documents of all documents submitted to us as copies. As to any facts material to these opinions, we have relied to the extent we deemed appropriate and without independent investigation upon statements and representations of officers and other representatives of the Company and others.

Gibson, Dunn & Crutcher LLP

One Embarcadero Center Suite 2600 | San Francisco, CA 94111-3715 | T: 415.393.8200 | F: 415.393.8306 | gibsondunn.com

Galecto, Inc. |  |  |  | February 10, 2026 Page 2

We have assumed without independent investigation that:

(i) at the time any Securities are sold pursuant to the Registration Statement (the “Relevant Time”), the Registration Statement and any supplements and amendments thereto (including post-effective amendments) will be effective and will comply with all applicable laws;

(ii) at the Relevant Time, a prospectus supplement will have been prepared and filed with the Commission describing the Securities offered thereby and all related documentation and will comply with all applicable laws;

(iii) all Securities will be issued and sold in the manner stated in the Registration Statement and the applicable prospectus supplement;

(iv) at the Relevant Time, all corporate or other action required to be taken by the Company to duly authorize each proposed issuance of Securities and any related documentation (including (i) the due reservation of any shares of Common Stock or Preferred Stock for issuance upon exercise, conversion or exchange of any Securities for Common Stock or Preferred Stock (a “Convertible Security”), and (ii) the execution (in the case of certificated Securities), delivery and performance of the Securities and any related documentation referred to in paragraphs 1 through 5 below) shall have been duly completed and shall remain in full force and effect;

(v) upon issuance of any Common Stock or Preferred Stock, including upon exercise, conversion or exchange of any Convertible Security, the total number of shares of Common Stock or Preferred Stock issued and outstanding will not exceed the total number of shares of Common Stock or Preferred Stock, as applicable, that the Company is then authorized to issue under its certificate of incorporation and other relevant documents;

(vi) in the case of Debt Securities, at the Relevant Time, the relevant trustee shall have been qualified under the Trust Indenture Act of 1939, as amended (the “TIA”), a Statement of Eligibility of the Trustee on Form T-1 shall have been properly filed with the Commission and the relevant Base Indenture shall have been duly executed and delivered by the Company and all other parties thereto and duly qualified under the TIA;

(vii) at the Relevant Time, a definitive purchase, underwriting or similar agreement and any other necessary agreement with respect to any Securities offered or issued will have been duly authorized by all necessary corporate or other action of the Company duly executed and delivered by the Company or any relevant trust and the other parties thereto.

Based on the foregoing and in reliance thereon, and subject to the assumptions, exceptions, qualifications and limitations set forth herein, we are of the opinion that:

| 1. | With respect to any Debt Securities when:

Galecto, Inc. |  |  |  | February 10, 2026 Page 3

| a. | the terms and conditions of such Debt Securities have been duly established by supplemental indenture or officers’ certificate in accordance with the terms and conditions of the relevant Base Indenture,

| b. | any such supplemental indenture has been duly executed and delivered by the Company and the relevant trustee (together with the relevant Base Indenture, the “Indenture”), and

| c. | such Debt Securities have been executed (in the case of certificated Debt Securities), delivered and authenticated in accordance with the terms of the applicable Indenture and issued and sold for the consideration set forth in the applicable definitive purchase, underwriting or similar agreement,

such Debt Securities will be legal, valid and binding obligations of the Company, enforceable against the Company in accordance with their respective terms.

| 2. | With respect to any shares of Preferred Stock, when:

| a. | the certificate of designations relating to such Preferred Stock has been duly executed and filed with the Office of the Secretary of State of the State of Delaware,

| b. | such shares have been issued either (i) in accordance with the applicable definitive purchase, underwriting or similar agreement and for the consideration therefor provided for therein or (ii) upon exercise, conversion or exchange of any Convertible Security and for any additional consideration specified in such Convertible Security or the instrument governing such Convertible Security providing for such conversion or exercise, which consideration (including any consideration paid for such Convertible Security), on a per-share basis, shall in either event not be less than the par value of the Preferred Stock, and

| c. | any such Convertible Security was previously validly issued and is fully paid and non-assessable (in the case of an equity Security) or is a legal, valid and binding obligation of the Company, enforceable against the Company in accordance with its terms,

such shares of Preferred Stock will be validly issued, fully paid and non-assessable.

| 3. | With respect to shares of Common Stock, when:

| a. | such shares of Common Stock have been duly executed (in the case of certificated shares) and delivered either (i) in accordance with the applicable definitive purchase, underwriting or similar agreement for the consideration provided for therein, or (ii) upon conversion or exercise of any Convertible Security, in accordance with the terms of such Convertible Security or the instrument governing such Convertible Security providing for such conversion or exercise, and for any additional consideration specified therein, which consideration (including any consideration paid for such Convertible Security), on a per-share basis, shall in either event not be less than the par value of the Common Stock, and

| b. | any such Convertible Security was previously validly issued and is fully paid and non-assessable (in the case of an equity Security) or is a legal, valid and binding obligation of the Company, enforceable against the Company in accordance with its terms,

such shares of Common Stock will be validly issued, fully paid and non-assessable.

Galecto, Inc. |  |  |  | February 10, 2026 Page 4

| 4. | With respect to any Warrants, when:

| a. | the warrant agreement relating to such Warrants (the “Warrant Agreement”), if any, has been duly executed and delivered by the Company and each other party thereto,

| b. | the terms of the Warrants have been established in accordance with the Warrant Agreement, if any, and the applicable definitive purchase, underwriting or similar agreement, and

| c. | the Warrants have been duly executed (in the case of certificated Warrants) and delivered in accordance with the Warrant Agreement, if any, and the applicable definitive purchase, underwriting or similar agreement for the consideration provided for therein,

such Warrants will be legal, valid and binding obligations of the Company, enforceable against the Company in accordance with their terms.

| 5. | With respect to any Units, when:

| a. | the unit agreement relating to the Units (the “Unit Agreement”), if any, has been duly executed and delivered by the Company and each other party thereto,

| b. | the terms of the Units have been duly established in accordance with the Unit Agreement, if any, and the applicable definitive purchase, underwriting or similar agreement, and

| c. | the Units have been duly executed (in the case of certificated Units) and delivered in accordance with the Unit Agreement, if any, and the applicable definitive purchase, underwriting or similar agreement for the consideration provided for therein,

the Units will be legal, valid and binding obligations of the Company, enforceable against the Company in accordance with their terms.

The opinions expressed above are subject to the following exceptions, qualifications, limitations and assumptions:

A. We render no opinion herein as to matters involving the laws of any jurisdiction other than the State of New York and the United States of America and, for purposes of paragraphs 2 and 3 above, the Delaware General Corporation Law. We are not admitted to practice in the State of Delaware; however, we are generally familiar with the Delaware General Corporation Law as currently in effect and have made such inquiries as we consider necessary to render the opinions contained in paragraphs 2 and 3 above. This opinion is limited to the effect of the current state of the laws of the State of New York, the United States of America and, to the limited extent set forth above, the laws of the State of Delaware and the facts as they currently exist. We assume no obligation to revise or supplement this opinion in the event of future changes in such laws or the interpretations thereof or such facts.

B. The opinions above with respect to the Indenture, the Debt Securities, the Warrants, the Warrant Agreement, the Units and the Unit Agreement (collectively, the “Documents”) are each subject to (i) the effect of any bankruptcy, insolvency, reorganization, moratorium, arrangement or similar laws affecting the rights and remedies of creditors’ generally, including without limitation the effect of statutory or other laws regarding fraudulent transfers or preferential transfers, and (ii) general principles of equity, including without limitation concepts of materiality, reasonableness, good faith and fair dealing and the possible unavailability of specific performance, injunctive relief or other equitable remedies regardless of whether enforceability is considered in a proceeding in equity or at law.

Galecto, Inc. |  |  |  | February 10, 2026 Page 5

C. We express no opinion regarding the effectiveness of (i) any waiver of stay, extension or usury laws; (ii) provisions relating to indemnification, exculpation or contribution, to the extent such provisions may be held unenforceable as contrary to public policy or federal or state securities laws; (iii) any provision in any Document waiving the right to object to venue in any court; (iv) any agreement to submit to the jurisdiction of any Federal court; or (v) any waiver of the right to jury trial.

D. To the extent relevant to our opinions in paragraphs 4 and 5 and not covered by our opinions in paragraphs 1, 2, and 3, we have assumed that any securities underlying, comprising or issuable upon exchange, conversion or exercise of any Warrants or Units are validly issued, fully paid and non-assessable (in the case of an equity security) or a legal, valid and binding obligation of the issuer thereof, enforceable against such issuer in accordance with its terms.

You have informed us that you intend to issue Securities from time to time on a delayed or continuous basis, and we understand that prior to issuing any Securities pursuant to the Registration Statement (i) you will advise us in writing of the terms thereof, and (ii) you will afford us an opportunity to (x) review the operative documents pursuant to which such Securities are to be issued or sold (including the applicable offering documents), and (y) file such supplement or amendment to this opinion (if any) as we may reasonably consider necessary or appropriate.

We consent to the filing of this opinion as an exhibit to the Registration Statement, and we further consent to the use of our name under the caption “Legal Matters” in the Registration Statement and the prospectus that forms a part thereof. In giving these consents, we do not thereby admit that we are within the category of persons whose consent is required under Section 7 of the Securities Act or the rules and regulations of the Commission promulgated thereunder.

Very truly yours,

/s/ Gibson, Dunn & Crutcher LLP