Exhibit 23.1

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We have issued our report dated March 15, 2013, with respect to the consolidated financial statements of StellarOne Corporation for the year ended December 31, 2012, included in Exhibit 99.1 of the Union First Market Bankshares Corporation’s amended Current Report Form 8-K/A, dated January 1, 2014. We hereby consent to the incorporation by reference of said report in the Registration Statements of Union First Market Bankshares Corporation on Forms S-3 (File Nos. 333-175807, 333-165874 and 333-144481) and on Forms S-8 (File Nos. 333-193364, 333-175808, 333-113842 and 333-113839).

/s/ GRANT THORNTON, LLP

Charlotte, North Carolina

February 20, 2014