Answer
Ulrika Eleonora's paternal grandmother was Hedvig Eleonora of Holstein-Gottorp. She was a member of the Holstein-Gottorp noble family and was born in 1636 in Gottorp, Germany. She was the daughter of Frederick III, Duke of Holstein-Gottorp and Duchess Maria Elisabeth of Saxony. She married Charles X Gustav, King of Sweden in 1654 and had several children, including the future King Charles XI.