What type of battery are you using?
If it's the traditional lead/acid battery, then the liquid is dilute sulfuric acid. If that were to dissolve organic materials such as plastic, cloth, etc, or even metals for that matter, it could give off offensive smelling gases. The fact that you were smelling the gases might not be so bad, not only did it alert you to the problem, but it should also mean that whatever the sulfuric acid dissolved, used the sulfuric acid up and you were not breathing the actual acid into your lungs. That would be very bad indeed.
As was suggested, you would probably be smart to consult with a GP, but before doing so try to find out what the sulfuric acid was reacting with, and try to look up the resulting gas MSDS online so you can express what exactly it was you were breathing, to the GP. Otherwise they are just going to check your lungs, ask you a few questions and not really be able to do anything else.
Scott