Exhibit 23.1
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We hereby consent to the incorporation by reference in the Registration Statements on Forms N-2 (No. 333-275934) and (No. 333-261398) of Gladstone Capital Corporation of our report dated November 13, 2024 relating to the financial statements, financial statement schedule, and senior securities table, which appears in this Form 10-K.

We also consent to the reference to us under the heading “Senior Securities” in this Form 10-K.
/s/ PricewaterhouseCoopers LLP
Washington, District of Columbia
November 13, 2024