I was recently (wrongly) diagnosed with a vitamin B12 deficiency, so like any rational patient at the time of diagnosis, I turned to Doctor Google, and turned up some interesting stuff.
B12 helps produce red blood cells, which carry oxygen around the body... including to muscles.
If there's a B12 deficiency, then the red blood cells tend to be overly large and don't function properly, so the muscles and organs get less oxygen than they need to work optimally.
Muscles can become fatigued more quickly and you can get out of breath faster than normal if you have a vitamin B12 deficiency.
There's a whole long list of frightening symptoms that go along with a B12 deficiency, but the main ones are:
Vitamin B12 isn't produced naturally within the body. Nor is it stored.
So we need to get ours from an external source every day.
The bad news is that no plants contain B12. So if you're a vegan, you're going to have to take a long hard look at whether you should be on supplements in the long term to avoid the nasties of B12 deficiency.
The good news is that B12 is found in abundance common foods that most of us eat every day:
So unless you've got a gastro problem that's going to stop you absorbing nutrients from your food, you should be able to get more than enough B12 from a balanced diet.
A lack of vitamin B12 hinders performance, so it's not much of a surprise that extra B12 boosts performance.
Blood doping refers to any process that increases the production and efficacy of red blood cell production in body. This increased efficacy means that more oxygen is available to the muscles and organs, meaning that an athlete can perform better.
So taking an excess of B12 can count as doping. Cyclists (and increasingly, runners) will often try to boost their performance with supplements, including B12, whilst still trying to stay within ethical bounds.
At the end of the day, a healthy diet, supplemented by an over-the-counter vitamin supplement if you've got gastro problems, is going to be all you need to make sure that you've got the vitamins you need to perform normally.