Exhibit 5.1

June 17, 2020
Essential Properties Realty Trust, Inc.
902 Carnegie Center Blvd., Suite 520
Princeton, NJ 08540
| Re: | Registration Statement on FormS-3 |
Ladies and Gentlemen:
We have served as Maryland counsel to Essential Properties Realty Trust, Inc., a Maryland corporation (the “Company”), in connection with certain matters of Maryland law relating to the offering and sale by the Company of shares (the “Shares”) of common stock, $0.01 par value per share (the “Common Stock”), of the Company, having an aggregate gross sales price of up to $250,000,000, in one or moreat-the-market offerings, covered by the above referenced Registration Statement, and all amendments related thereto (the “Registration Statement”), filed by the Company with the Securities and Exchange Commission (the “Commission”) under the Securities Act of 1933, as amended (the “Securities Act”).
In connection with our representation of the Company, and as a basis for the opinion hereinafter set forth, we have examined originals, or copies certified or otherwise identified to our satisfaction, of the following documents (hereinafter collectively referred to as the “Documents”):
1. The Registration Statement and the related form of prospectus included therein in the form filed with the Commission under the Securities Act;
2. The Prospectus Supplement, dated as of June 17, 2020 (the “Prospectus Supplement”), in the form in which it was transmitted to the Commission for filing pursuant to Rule 424(b) under the Securities Act;
3. The charter of the Company (the “Charter”), certified by the State Department of Assessments and Taxation of Maryland (the “SDAT”);
4. The Bylaws of the Company, certified as of the date hereof by an officer of the Company;
5. A certificate of the SDAT as to the good standing of the Company, dated as of a recent date;
6. Resolutions adopted by the Board of Directors of the Company relating to, among other matters, the registration, sale and issuance of the Shares, certified as of the date hereof by an officer of the Company;