Edward II's mother was Eleanor of Castile, probably born in 1241. On 1 November 1254, she married the future Edward I (born 1239), elder son of Henry III, in Burgos; their marriage was intended to prevent her half-brother Alfonso X from claiming Gascony, which was ruled by England at that time. Eleanor bore fifteen or sixteen children, but only six of them outlived her (see here and here for my previous posts on her children).
Eleanor's mother was Jeanne de Dammartin, born circa 1216/20, Countess of Ponthieu and Montreuil in her own right. Jeanne had once been betrothed to Henry III, but he broke off the engagement in order to marry Eleanor of Provence. She married Fernando III, king of Castile and Leon, in 1237. Born circa 1200, Fernando united the kingdoms of Castile and Leon in 1231, and spent a large part of his reign fighting the Moors. His first marriage to Elisabeth of Hohenstaufen, cousin of Emperor Frederick II, produced ten children. On his death in 1252, Fernando was succeeded by his son Alfonso X, born 1221, reigned 1252-1284. He was known as 'El Sabio', 'The Wise' or 'The Learned', and was Edward II's half-uncle. Fernando III was canonised in 1671 (I really like the fact that Edward II was the grandson of a saint!)
The marriage of Fernando III and Jeanne de Dammartin produced one daughter, Eleanor, two sons who died in early childhood, and two other sons who both died in 1269. After she was widowed, Jeanne returned to her native Ponthieu, where she died in 1279. Her only surviving child Queen Eleanor inherited Ponthieu and Montreuil, which eventually passed to her son, the future Edward II, on her death in 1290. As Edward was only six years old then, the lands were adminstered for him by his uncle Edmund of Lancaster. Edward granted the revenues of Ponthieu and Montreuil to Isabella three months after their wedding in 1308. The lands passed to the French crown during the Hundred Years War.
Alfonso X was succeeded by his son Sancho IV, Edward II's first cousin, who ruled from 1284 to 1295. Sancho's son Fernando IV was the king of Castile and Leon at the time of Edward II's succession in 1307 (Fernando ruled 1295 to 1312, and died at the age of twenty-six). Relations between Edward II and Castile were generally very good throughout his reign. He was keen to marry his daughter Eleanor of Woodstock to Alfonso XI, son of Fernando IV and thus Edward's first cousin twice removed, and his son the future Edward III to Alfonso's sister Leonor, but nothing came of the plans. Eleanor of Woodstock had a lucky escape, as Alfonso XI neglected his Portuguese wife in favour of his mistress, who bore him ten children, and is known as 'The Avenger' or 'The Implacable'.