Gertrude was the daughter of the Bavarian Count Berthold IV of Andechs, Margrave of Carniola and Istria,[3] and his wife Agnes[4] from the Saxon House of Wettin.
Their brothers were Otto, who inherited the title of Duke of Merania and succeeded their father in his Bavarian domains, Henry who took over the rule in Carniola and Istria, and Berthold who became a close advisor to Gertrude and was named Archbishop of Kalocsa.
Gertrude married the Árpád prince Andrew II, younger son of late King Béla III of Hungary, before 1204.
Things improved for her, when Prince Andrew took over the government of the Hungarian kingdom upon the death of King Emeric in 1204, officially as regent for his minor nephew Ladislaus III, who nevertheless died in exile one year later.
While King Andrew was campaigning in Galicia, a Hungarian noble, Peter, son of Töre, decided to assassinate the queen and in 1213, on a hunt with Berthold and their guest Duke Leopold VI of Austria in the Pilis Mountains, she was killed.
His son, King Béla IV, used the killing of his mother decades later for political showdowns, accusing non-genuine accomplices of earlier involvement.
There is no proof that Gertrude was an exploitative or negligent regent, and although Bánk bán was a real historical person, there's no evidence that he was the one who murdered the queen and no records of him having a wife.