Gardnerella?!?

I went to the gynecologist today for what I thought was a pretty bad yeast infection. They did a swab and when called to tell me the results they said I have gardnerella. All they told me was they were putting me on an antibiotic and they stressed that this was not an STD. So what is this and what causes it? Can i still have sex?