The election for the parliament of 1831 was entirely in the hands of the town council, and Gairdner, a reformer, seconded the nomination of Francis Jeffrey, Lord Advocate.
The majority of the council, however, disregarded a petition presented to them and elected Robert Adam Dundas.
They departed through back streets, while a mob attacked the Lord Provost and threatened to throw him over the North Bridge.
[2] With his friend William Wood, Gairdner supported a move allowing medical students at the University of Edinburgh the right to receive professional training from extra-academical lectures.
He also gave evidence before parliamentary committees in London, on behalf of the Royal College of Surgeons of Edinburgh, in the efforts made to secure a legal status for licensed practitioners of medicine and surgery extending throughout the UK, ahead of the Medical Act 1859.
[4] Gairdner wrote in Transactions of the Medico-Chirurgical Society of Edinburgh, and in the medical journals, almost to the end of his life.
[1] In 1817 Gairdner married his cousin Susanna Tennant (d.1860), a granddaughter of Dr William Dalrymple of Ayr.