Bee venom contains several components that cause pain and inflammation. While peptides like melittin are major contributors, formic acid, also known as methanoic acid (HCOOH), is present in bee venom and contributes to the burning and painful sensation.