Is there a circuit that 'blocks' or 'opens' another circuit as long as there is current running?
What you want is called a relay.  That's a mechanical switch that is activated by a electro-magnet.  When power is applied to the magnet, the switch is one way.  When power is removed, the switch goes the other way.

Relays come in a variety of switch configurations.  A very common one is single pole, double throw (SPDT).  That means there is one center connection that is connected to one of two outer connections, depending on whether the magnet is energized or not.

You want to have your AC power drive the magnet, and the battery power connected thru the normally closed (NC) connection.  In this case, "normal" refers to no power applied to the magnet.  That switch is closed (meaning it conducts) when there is no AC power.  When AC power is present, the switch opens, and the battery is disconnected.

Relays are available with a large variety in what it takes to power the electro-magnet.  In your case, you want a relay that is intended to be run from whatever your line power is.  That would be a 115 VAC at 60 Hz here in North America, for example.