By the time Lydia met Branwell Brontë, she was in her thirties and had been the wife of the Rev. Edmund Robinson, a curate from Derby, for at least fifteen years.
In 1840, the 20-year-old Anne Brontë (the youngest of the Brontë girls) had started working for the Rev. and Mrs. Robinson as a governess to their four children. Anne had moved in with the Robinsons, living in their family home at Thorp Green Hall, a wealthy country house near York.
In 1843, Anne also secured a position there for her unsettled brother Branwell, then aged 26. While Anne continued to tutor the three Robinson girls, Branwell was to take over from her as tutor to the Robinsons’ only son, Edmund (junior), who was now growing too old to be under Anne’s care.
Branwell did not live in the Hall itself with the Robinson family as Anne did, but in a smaller building nearby on the same grounds, known as The Monk’s Lodge.
During this time he corresponded with a number of old friends about his increasing infatuation with Robinson's wife Lydia, who was the daughter of Rev. Thomas Gisborne. He was dismissed on unspecified charges in 1845. It is thought, according to his account to his own family, the Robinson family's silence on the reason for his dismissal, and subsequent gifts of money from Mrs. Robinson through her servants, that he had an affair with Mrs. Robinson and that the affair had been discovered by her husband.
When his mistress' husband died in May 1846, Branwell was convinced he would now marry Mrs. Robinson, though she had no intention of marrying a penniless man seventeen years her junior. She kept Branwell away by telling him that Mr. Robinson's will required her to stay away from him, never mind marrying him.
read here for more information