Exhibit 5.1
Consent of Independent Registered Public Accounting Firm
We hereby consent to the incorporation by reference in the Registration Statement on Form F-10 of CGI Inc. of our report dated November 4, 2025, relating to the consolidated financial statements and the effectiveness of internal control over financial reporting, which appears in exhibit 99.2 to CGI Inc.’s Annual Report on Form 40-F for the year ended September 30, 2025. We also consent to the reference to us under the heading “Interests of Experts” in the Annual Information Form, filed as Exhibit 99.1 to CGI Inc.’s Annual Report on Form 40-F, which is incorporated by reference in such Registration Statement. We also consent to the reference to us under the heading, “Auditors, Registrar and Transfer Agent” in such Registration Statement.
/s/PricewaterhouseCoopers LLP
Montréal, Canada
December 18, 2025