Please wait

QuickLinks -- Click here to rapidly navigate through this document


Exhibit 5.1

GRAPHIC

June 1, 2016

EQT GP Holdings, LP
625 Liberty Avenue, Suite 1700
Pittsburgh, Pennsylvania 15222

Ladies and Gentlemen:

        We have acted as counsel to EQT GP Holdings, LP, a Delaware limited partnership (the "Partnership"), with respect to certain legal matters in connection with the filing by the Partnership 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"), registering the offer and sale by the Partnership or a selling unitholder, from time to time, pursuant to Section 415 under the Securities Act, of common units representing limited partner interests in the Partnership ("Common Units"). At your request, this opinion is being furnished to you for filing as Exhibit 5.1 to the Registration Statement.

        In our capacity as your counsel in the connection referred to above and as a basis for the opinions hereinafter expressed, we have examined (i) the Registration Statement, including the prospectus contained in the Registration Statement (the "Prospectus"), (ii) the First Amended and Restated Agreement of Limited Partnership of the Partnership (the "Partnership Agreement") and the Certificate of Limited Partnership of the Partnership (the "Certificate"), each as amended to the date hereof, (iii) the First Amended and Restated Limited Liability Company Agreement of EQT GP Services, LLC, a Delaware limited liability company and the general partner of the Partnership (the "General Partner"), and the Certificate of Formation of the General Partner, each as amended to the date hereof, (iv) originals, or copies certified or otherwise identified, of the partnership and limited liability company records of the Partnership and the General Partner, as furnished to us by the General Partner, (v) originals, or copies certified or otherwise identified, of certificates of public officials and of representatives of the Partnership and the General Partner, and (vi) statutes and other instruments and documents as we deemed necessary or advisable for the purposes of this opinion.

        In making our examination, we have assumed that (i) the Registration Statement and any amendments thereto (including post-effective amendments) will have become effective; (ii) a prospectus supplement will have been prepared and filed with the Commission describing the Common Units offered thereby; (iii) all Common Units will be issued and sold in compliance with applicable federal and state securities laws and in the manner stated in the Registration Statement and the appropriate prospectus supplement; (iv) a definitive purchase, underwriting or similar agreement with respect to any Common Units offered will have been duly authorized and validly executed and delivered by the Partnership and the other parties thereto; (v) the certificates, if any, for the Common Units will conform to the specimens thereof examined by us and will have been duly countersigned by a transfer agent and duly registered by a registrar of the Common Units, or, if uncertificated, valid book-entry notations will have been made in the unit register of the Partnership in accordance with the provisions of the governing documents of the Partnership; and (vi) each document submitted to us for review is accurate and complete, each such document that is an original is authentic, each such document that is a copy conforms to an authentic original and all signatures on each such document are genuine.




GRAPHIC
  2   June 1, 2016

        Based upon and subject to the foregoing, we are of the opinion that: (i) with respect to Common Units to be offered and sold by the Partnership, when (a) the Partnership has taken all necessary action to approve the issuance of the Common Units, the terms of the offering thereof and related matters, and (b) such Common Units have been issued and delivered in accordance with the terms of the applicable definitive purchase, underwriting or similar agreement approved by the Partnership upon payment of the consideration thereof or provided for therein, then the Common Units will be validly issued, fully paid and non-assessable; and (ii) with respect to the Common Units to be sold by the selling unitholder to be named in a prospectus supplement, such Common Units have been duly authorized and are validly issued, fully paid and non-assessable.

        The foregoing opinion is limited in all respects to the Delaware Revised Uniform Limited Partnership Act, the Delaware Limited Liability Company Act and applicable reported judicial decisions, rules and regulations interpreting and implementing those laws, and the federal laws of the United States of America, in each case as in effect on the date hereof. We express no opinion as to the effect of the laws of any other jurisdiction.

        We hereby consent to the filing of this opinion as Exhibit 5.1 to the Registration Statement and to the reference to our firm under the caption "Legal Matters" in the Prospectus. In giving this consent, we do not hereby 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 thereunder.

    Very truly yours,

 

 

/s/ Baker Botts L.L.P.



QuickLinks