Exhibit 23.1

Consent of Independent Registered Public Accounting Firm

We consent to the reference to our firm under the caption “Experts” and to the use of our report dated September 30, 2021, with respect to the consolidated financial statements of Allego Holding B.V., in the Registration Statement (Form F-1) and related Prospectus of Allego N.V. dated March 31, 2022.

/s/ Ernst & Young Accountants LLP

Amsterdam, Netherlands

March 31, 2022