A gas sensor comprising: a gas detection element comprising, an element main body which is made up of a cylindrical solid electrolyte which extends in an axial direction and which is closed at a front end thereof, and an inner electrode and an outer electrode which are provided on an inner side and an outer side of the element main body, respectively; a cylindrical casing which holds the gas detection element inside a through hole which penetrates in the axial direction; a cylindrical separator having electrical insulation properties, which is disposed in an interior of the casing at a rear end side of the gas detection element with a space defined between the casing and itself and through which at least a lead wire is passed; a closure member which is disposed at a rear end side of the separator, through which the lead wire is inserted, and which closes a rear end side of the casing; and a terminal metal fixture which has an electrode contact portion fitted in the gas detection element so as to be brought into contact with the inner electrode and which is connected to the lead wire, wherein the casing has a ventilation hole (59, 61) which is formed at a position further forwards than the closure member to introduce a reference gas from the outside thereof, wherein the terminal metal fixture comprises a lead wire connecting portior (71, 73) which is fitted in the gas detection element and to which the lead wire is connected and an exposed portion which is provided further rearwards than the gas detection element and at least a part of which is brought into contact with the separator, wherein the exposed portion comprises a flange portion which is held between a rear end face of the gas detection element and a front end face of the separator and which projects further radially outwards than the electrode contact portion, and has a gap which is provided between surfaces defined by the rear end face of the gas detection element and the front end face of the separator at a predetermined location in a circumferential direction so as to establish communication between the space and an interior of the gas detection element, and wherein the reference gas that has passed through the ventilation hole (59, 61) passes through the space and the gap to be introduced into an interior of the gas detection element. a gas detection element comprising, an element main body which is made up of a cylindrical solid electrolyte which extends in an axial direction and which is closed at a front end thereof, and an inner electrode and an outer electrode which are provided on an inner side and an outer side of the element main body, respectively; an element main body which is made up of a cylindrical solid electrolyte which extends in an axial direction and which is closed at a front end thereof, and an inner electrode and an outer electrode which are provided on an inner side and an outer side of the element main body, respectively; a cylindrical casing which holds the gas detection element inside a through hole which penetrates in the axial direction; a cylindrical separator having electrical insulation properties, which is disposed in an interior of the casing at a rear end side of the gas detection element with a space defined between the casing and itself and through which at least a lead wire is passed; a closure member which is disposed at a rear end side of the separator, through which the lead wire is inserted, and which closes a rear end side of the casing; and a terminal metal fixture which has an electrode contact portion fitted in the gas detection element so as to be brought into contact with the inner electrode and which is connected to the lead wire, wherein the casing has a ventilation hole (59, 61) which is formed at a position further forwards than the closure member to introduce a reference gas from the outside thereof, wherein the terminal metal fixture comprises a lead wire connecting portior (71, 73) which is fitted in the gas detection element and to which the lead wire is connected and an exposed portion which is provided further rearwards than the gas detection element and at least a part of which is brought into contact with the separator, wherein the exposed portion comprises a flange portion which is held between a rear end face of the gas detection element and a front end face of the separator and which projects further radially outwards than the electrode contact portion, and has a gap which is provided between surfaces defined by the rear end face of the gas detection element and the front end face of the separator at a predetermined location in a circumferential direction so as to establish communication between the space and an interior of the gas detection element, and wherein the reference gas that has passed through the ventilation hole (59, 61) passes through the space and the gap to be introduced into an interior of the gas detection element.