Why are there bitter bits in my cake? I made a vanilla cake from scratch using this recipe and when I removed it from the pan, I noticed little brown lumps along the bottom and edges the size of BB pellets.  

I tasted one of the spots, thinking it was burnt sugar, but it was very hard and very very bitter. I think it tasted like baking powder but also lemony. This is the second time this has happened to me using different recipes. It never happens when I make a chocolate cake.   

All the ingredients today were fresh, everything was at room temperature, and the pan was clean. I greased it with Pam and then placed parchment paper circles. I did not have cake flour, so I used AP flour. The batter looked fine and had no lumps in it, I scraped down the sides of the mixing bowl, and nothing tasted off when I licked the spoon. I think it has something to do with adding the baking powder. 

What would cause this?
It may have been baking powder but it doesn't matter what it was.
Cake methods produce a homogeneous batter. There shouldn't be lumps of anything.

The sugar is creamed with the butter until it is smooth. The dry ingredients are mixed together and most recipes call for sifting them into the wet to prevent exactly these kind of lumps. I will admit that, unless my dry ingredients are obviously clumpy, I will often skip the sifting step to save another utensil to clean.

Make sure that you scrape down the sides of the bowl to ensure there are no unincorporated ingredients.

Some baked goods, like pancakes or biscuits, intentionally under mix to keep things tender. Cake instead relies on low protein flour and lots of fat to keep things tender and the batter should be completely blended.