Flap or gear selection should not inhibit Go Around.
On the 747-400, flaps must be down (or the glideslope captured) for the Autopilot/Flight Director and Autothrottle "Go Around" mode to arm. Then it is up to you to activate it with a push of one of the TOGA switches on the thrust levers. Selecting different flaps afterwards should not affect the go-around.
If the Autopilot is not engaged, the plane will not fly itself up/down left/right. If the A/T switch is not armed, the thrust levers will not provide go-around thrust.
(EDIT) TO/GA mode will remain engaged until either you change the mode, or the aircraft reaches the altitude set in the Autopilot Mode Control Panel (although it is advisable to change pitch mode prior to that).
However, as stated before, it's all dependent on aircraft type.