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 March 9, 2007, with respect to the consolidated financial statements of W&T Offshore, Inc. and subsidiaries, W&T Offshore, Inc. management’s assessment of the effectiveness of internal control over financial reporting, 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, 2006.

/s/    ERNST & YOUNG LLP

Houston, Texas

March 9, 2007