Exhibit 23.1

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We consent to the incorporation by reference in the Registration Statements (Form S-3 No. 333-157793 and Form S-4 No. 333-177749) of W&T Offshore, Inc. and in the related Prospectuses and the Registration Statement (Form S-8 No. 333-159005) pertaining to the W&T Offshore, Inc. Long-Term Incentive Compensation Plan and Registration Statement (Form S-8 No. 333-126252) pertaining to the W&T Offshore, Inc. 2004 Directors Compensation Plan, respectively, of our reports dated February 27, 2012, with respect to the consolidated financial statements of W&T Offshore, Inc. and subsidiaries, and the effectiveness of internal control over financial reporting of W&T Offshore, Inc. and subsidiaries included in this Annual Report (Form 10-K) for the year ended December 31, 2011.

/s/ ERNST & YOUNG LLP

Houston, Texas

February 27, 2012