The TV presenters and comedians are close friends who often work together, having co-hosted the original version of The Great British Bake Off on BBC.
But when Perkins took part in the BBC One genealogy show, airing on Thursday, she found out that they had an "amazing" shared family history.
Talking to Giedroyc about what she knew of her ancestry at the beginning of the episode, she said: "I know that there's some kind of Eastern European connection and part of me's hoping it's Lithuania because I really like the idea that my ancestors were toshing around the same neck of the woods as yours."
Giedroyc, whose family are Lithuanian, said: "That would be amazing."
Perkins agreed: "That would be so odd."
Incredibly, when Perkins travelled to Germany to find out more about her great-grandmother Anna, she was told that Anna was born in a part of Russia that is now in Lithuania.
An emotional Perkins said: "I can't even tell you how delighted I am that it's Lithuania because Mel who I work with and who's family to me, she's Lithuanian. That makes me so happy."
There was also a strange coincidence involving Perkins' love of boxing and the Lithuanian church where Anna was baptised.
At the beginning of the episode, Perkins explained: "Some people might find their spiritual dimension in a lotus pose...I find mine in an upper cut. I'm someone who spends a lot of time in my own head...what boxing does is it dulls the chitter chatter. There's a flow and a relaxation to it, and I love it."
In the final minutes of the episode, she visits the Lithuanian church where her great-grandmother Anna was baptised and walks through the door to discover it has been converted to a boxing gym.
She said: "No way! You are kidding me! The universe couldn't have planned this better. If this was a story I saw written down I'd go, no, that final scene's too pat, it doesn't work.
"I mean, what a narrative arc. The Lutheran church is now a boxing gym.
"This has just done my head in because everything always comes full circle but never in such a poetic way as this. I feel so joyful, I couldn't have been more delighted by this whole thing."
Sue Perkins' episode of Who Do You Think You Are? airs on Thursday at 9pm on BBC One.
Watch: Josh Widdicombe learns he is a descendent of King Edward I