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-132960) of W&T Offshore, Inc. and in the related Prospectus and the Registration Statements (Form S-8 Nos. 333-126251 and 333-126252) pertaining to the W&T Offshore, Inc. Long-Term Incentive Compensation Plan and the W&T Offshore, Inc. 2004 Directors Compensation Plan, respectively, of our reports dated February 27, 2009, 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. included in this Annual Report (Form 10-K) for the year ended December 31, 2008.

/s/ ERNST & YOUNG LLP

Houston, Texas

February 27, 2009