Exhibit 5.1

KPMG LLP
Bay Adelaide
Centre Suite 4600
333 Bay Street
Toronto, ON M5H 2S5
Tel 416-777-8500
Fax 416-777-8818
www.kpmg.ca
Consent of Independent Registered Public Accounting Firm
The Board of Directors
GFL Environmental Inc.
We consent to the use of our reports dated February 27, 2025, with respect to the consolidated financial statements of GFL Environmental Inc. (the “Company”), and the effectiveness of internal control over financial reporting, incorporated herein by reference in the short form base shelf prospectus of the Company included in this Registration Statement on Form F-10.
/s/ KPMG LLP
Chartered Professional Accountants, Licensed Public Accountants
November 19, 2025
Toronto, Canada