Lack of vitamin B12 in your diet: People who don't eat enough foods that naturally have vitamin B12 or don't eat foods fortified with vitamin B12 can develop vitamin B12 deficiency. Gastritis: Gastritis is inflammation of the stomach lining, and it's a common cause of vitamin B12 deficiency