What is the term to describe the use of "City Hall" in "you can't fight City Hall"?

Solution 1:

Yours is a textbook case of metonymy, which Silva Rhetorica by BYU's Gideon Burton defines as

Reference to something or someone by naming one of its attributes.

City hall is a building associated with local government, and used metaphorically to represent local government as a whole. See also What is the difference between metonymy and synecdoche?

It is not anthropomorphism because we are not talking about the physical building itself. An anthropomorphism might be represented by something like

Erie's City Hall squats lazily, reaching toward State Street but never quite making it.

Solution 2:

The word you are looking for is metonymy.