A by-election was held for the New South Wales Legislative Assembly electorate of Gwydir on 29 June and 20 July 1865 as a result of the Committee on Elections and Qualifications declaring that the seat of Thomas Dangar was vacant because he had an office of profit under the Crown.