Gedoumaru is a Shikigami bound to the Ketsuno Clan. She ended up with Sakata Gintoki and the Yorozuya after Ketsuno Ana handed her over as backup during the Exorcist arc, figuring they'd need the extra help.
She's known for being ruthless and willing to do whatever it takes to win a fight. In Episode 195, fans often point to her faking her own mother's death as the perfect example of this—she tricked the other Shikigami into lowering their guard just to get an edge. She's also shown zero loyalty to her master; if Gintoki ever looks weak, she won't hesitate to turn on him.
According to Gedoumaru herself back in Episode 195, the Ketsuno Clan caught her way back during the Heian period while she was destroying Mt. Oe. They've had her serving them ever since, which explains a lot about her disposition.
Content compiled by AnimeList.moe from publicly available sources.