Gustav IV Adolf of Sweden
Wilhelm was born in Karlsruhe, Grand Duchy of Baden, on 18 December 1829 as the fifth child and third surviving son of Leopold, Grand Duke of Baden, and his wife Princess Sophie of Sweden. Through his father, Wilhelm was a grandson of Charles Frederick, Grand Duke of Baden and his wife Baroness Louise Caroline Geyer of Geyersberg and through his mother, a grandson of Gustav IV Adolf of Sweden and his wife Frederica of Baden.