Halle Berry just arrived at the L.A. County Courthouse … ready to do battle with baby daddy Gabriel Aubry.

Halle is trying to get a restraining order … prohibiting Gabriel from having any contact with Nahla until the child endangerment investigation targeting him is resolved.

Sources tell us … it’s possible Halle will be required to testify today. Gabriel is trying to get an order firing the nanny … something Halle doesn’t want.