A gas sensor comprising: a sensor element which extends in an axial direction and which has an electrode terminal portion (5f, 5g, 5j, 5k) on a rear side of the sensor element; a metal shell which surrounds a periphery of the sensor element; an outer casing which is made of metal, which has a tubular shape extending in the axial direction, and which is mounted on a portion on a rear side of the metal shell; a metal terminal (41, 42, 43, 44) which extends in the axial direction and which has a front side connection portion (41b, 42b, 43b, 44b) to which the electrode terminal portion (5f, 5g, 5j, 5k) of the sensor element is connected; a separator which has a tubular shape extending in the axial direction, which is placed inside the outer casing so as to be spaced apart from an inner peripheral surface of the outer casing, and in which the front side connection portion (41b, 42b, 43b, 44b) of the metal terminal (41, 42, 43, 44) and a portion, of the sensor element, having the electrode terminal portion (5f, 5g, 5j, 5k) are housed; and a lead wire (31, 32, 33, 34) which is connected to a rear side connection portion (41c,42c, 43c,44c), of the metal terminal (41, 42, 43, 44), located on a rear side of the metal terminal (41, 42, 43, 44), and which extends to a rear side of the gas sensor, wherein the gas sensor further comprises a metal holder which has a tubular shape extending in the axial direction and includes a cylindrical body portion and which is placed inside the outer casing so as to surround a periphery of the separator to hold the separator, wherein the metal holder includes: a holding portion which is in contact with the separator to hold the separator; a tubular side wall portion of the body portion; an outer casing contact portion which is in contact with the inner peripheral surface of the outer casing, and connecting portions connecting the side wall portion and the outer casing contact portion, characterized in that the connecting portions are formed as leaf springs and are configured to elastically deform in the radial direction of the body portion, and in that the outer casing contact portion is welded to only the outer casing and fixed to the outer casing, whereby a welded portion of the outer casing contact portion of the metal holder and the outer casing is formed. a sensor element which extends in an axial direction and which has an electrode terminal portion (5f, 5g, 5j, 5k) on a rear side of the sensor element; a metal shell which surrounds a periphery of the sensor element; an outer casing which is made of metal, which has a tubular shape extending in the axial direction, and which is mounted on a portion on a rear side of the metal shell; a metal terminal (41, 42, 43, 44) which extends in the axial direction and which has a front side connection portion (41b, 42b, 43b, 44b) to which the electrode terminal portion (5f, 5g, 5j, 5k) of the sensor element is connected; a separator which has a tubular shape extending in the axial direction, which is placed inside the outer casing so as to be spaced apart from an inner peripheral surface of the outer casing, and in which the front side connection portion (41b, 42b, 43b, 44b) of the metal terminal (41, 42, 43, 44) and a portion, of the sensor element, having the electrode terminal portion (5f, 5g, 5j, 5k) are housed; and a lead wire (31, 32, 33, 34) which is connected to a rear side connection portion (41c,42c, 43c,44c), of the metal terminal (41, 42, 43, 44), located on a rear side of the metal terminal (41, 42, 43, 44), and which extends to a rear side of the gas sensor, wherein the gas sensor further comprises a metal holder which has a tubular shape extending in the axial direction and includes a cylindrical body portion and which is placed inside the outer casing so as to surround a periphery of the separator to hold the separator, wherein the metal holder includes: a holding portion which is in contact with the separator to hold the separator; a tubular side wall portion of the body portion; an outer casing contact portion which is in contact with the inner peripheral surface of the outer casing, and connecting portions connecting the side wall portion and the outer casing contact portion, a holding portion which is in contact with the separator to hold the separator; a tubular side wall portion of the body portion; an outer casing contact portion which is in contact with the inner peripheral surface of the outer casing, and connecting portions connecting the side wall portion and the outer casing contact portion, an outer casing contact portion which is in contact with the inner peripheral surface of the outer casing, and connecting portions connecting the side wall portion and the outer casing contact portion,