Exhibit 23.1

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We hereby consent to the incorporation by reference in the Registration Statement on Form S-8 (No. 33-87034) of Gibraltar Industries, Inc., formerly known as Gibraltar Steel Corporation, of our report dated June 27, 2012 relating to the financial statements and Supplemental Schedule of Gibraltar 401(k) Plan as of and for the year ended December 31, 2011, which appears in this Form 11-K.

/s/ Freed Maxick, CPAs, PC

(Formerly known as Freed Maxick and Battaglia, CPAs, PC)

Buffalo, New York

June 27, 2012