you cant pass a $0 valued transaction through a payment gateway, they wont except it.
either you will need to force the cart to have at least one item that has a price in it before checking out, or create a second set of checkout pages using the checkout wizard, this time selecting No Gateway.
make sure that these new checkout pages have a unique name.
then add code to the original checkout pages to pass over to the no gateway pages if the cart price is 0. and add code the No gateway pages to pass to the gateway pages if the price is > 0.