The pungent substance found in ginger - otherwise known as 6-gingerol - reduces bad breath by stimulating an enzyme in saliva which breaks down the substances that give breath a foul smell.
Make sure you are brushing your teeth thoroughly twice a day. Also make sure that you are flossing and rinsing your mouth daily as well. Sometimes little particles of food may get stuck in your teeth or in the back of your throat. The bacteria that is present can cause your breath to turn sour. Diligent oral care is key.