Wilson Sonsini Goodrich & Rosati Professional Corporation 650 Page Mill Road Palo Alto, California 94304-1050 O: 650.493.9300 F: 650.493.6811 AUSTIN BEIJING BOSTON BRUSSELS HONG KONG LONDON LOS ANGELES NEW YORK PALO ALTO SAN DIEGO SAN FRANCISCO SEATTLE SHANGHAI WASHINGTON, DC WILMINGTON, DE Exhibit 5.1 OPINION OF WILSON SONSINI GOODRICH & ROSATI, PROFESSIONAL CORPORATION December 30, 2021 Oportun Financial Corporation 2 Circle Star Way San Carlos, CA 94070 Re: Registration Statement on Form S-8 Ladies and Gentlemen: We have examined the Registration Statement on Form S-8 (the “Registration Statement”) to be filed by you with the Securities and Exchange Commission on or about the date hereof, in connection with the registration under the Securities Act of 1933, as amended, of an aggregate of 655,000 shares of your common stock, par value $0.001 per share (the “Common Stock”), reserved for issuance under the 2021 Inducement Equity Incentive Plan (the “Inducement Plan”). As your legal counsel, we have examined the proceedings taken and are familiar with the actions proposed to be taken by you in connection with the issuance and sale of the Common Stock under the Inducement Plan and pursuant to the agreements related thereto. On the basis of the foregoing, and in reliance thereon, we are of the opinion that the Common Stock, when issued and sold in the manner referred to in the applicable Inducement Plan and pursuant to the agreements which accompany the Inducement Plan, will be legally and validly issued, fully paid and nonassessable. We consent to the use of this opinion as an exhibit to the Registration Statement, and further consent to the use of our name wherever appearing in the Registration Statement and any amendments thereto. Very truly yours, /s/ Wilson Sonsini Goodrich & Rosati, Professional Corporation