Exhibit 23.1

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We consent to the incorporation by reference in the Registration Statement (Form S-3 No. 333-157793) of W&T Offshore, Inc. and in the related Prospectuses and the Registration Statements (Form S-8 Nos. 333-126251 and 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 March 1, 2010, 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, 2009.

/s/ ERNST & YOUNG LLP

Houston, Texas

March 1, 2010