The Baratheon family name came from a b*stard brother to Aegon the Conquerer, that is what you are referring to
But my connection still stands
Egg's 4th child was a girl named Rhaelle. Rhaelle married an unknown Baratheon male. Their first child was Steffon Baratheon, father to Robert Stannis and Renly
So Maester Aemon is just as closely related to Stannis as he is to Daenerys, but Daenerys is part of the royal line of succession while the Baratheon brothers are not
Now, you can stop reading here if you want because I'm about to get confusing, but let me drop some more
knowledge
Hundreds of years ago was the "Dance of Dragons" which was a civil war within the Targ dynasty regarding succession of the throne. The King had named his daughter heir, but because she was a woman her brother made a claim instead and started the war. I'm not gonna go into the details, but at the end of the war it was decided that male heirs would always take precedence over female heirs in the event of problem with the line of succession such as a branch in the family tree all dying out. This male preference included cousins. So now that Viserys was murdered by Khal Drogo, I could make an argument that since Dany is the only Targ left on the Mad King's branch and she is a female, that Robert Baratheon was the rightful heir to the throne even without having laid claim to it after his rebellion. I can further that argument and state that Stannis is the rightful heir to the Iron Throne both as an act of conquering by Robert and as part of the royal Targaryen bloodline even with Dany alive
EDIT: If you haven't read the books,
do not search for a Targaryen family tree for help visualizing the confusion. Just a warning.