A gas sensor for detecting a gas molecule including a hydrogen atom contained in gas, comprising: a first electrode (103, 303, 503) having a first main surface and a second main surface opposite to the first main surface; a second electrode (106, 306, 506) having a third main surface facing the second main surface of the first electrode (103, 303, 503) and a fourth main surface opposite to the third main surface; a metal oxide layer (104, 204, 304; 404, 504, 604) disposed between the first electrode and the second electrode and being in contact with the second main surface of the first electrode (103, 303, 503) and the third main surface of the second electrode (106, 306, 506); and an insulating film (107, 307) covering at least a part of the first electrode (103, 303, 503), a part of the second electrode (106, 306, 506), and at least a part of the metal oxide layer (104, 204, 304; 404, 504, 604), wherein at least a part of the fourth main surface of the second electrode (106, 306, 506) is not covered with the insulating film (107, 307) and is exposed to the gas; the metal oxide layer (104, 204, 304; 404, 504, 604) has characteristics of decreasing the resistance value of the metal oxide layer (104, 204, 304; 404, 504, 604) when the second electrode (106, 306, 506) is in contact with the gas molecule; the metal oxide layer includes a local region (105, 305, 505) being in contact with the second electrode (106, 306, 506); and a degree of oxygen deficiency of a metal oxide contained in the local region (105, 305, 505) is larger than a degree of oxygen deficiency of a metal oxide contained in the portion other than the local region (105, 305, 505) in the metal oxide layer (104, 204, 304; 404, 504, 604). a first electrode (103, 303, 503) having a first main surface and a second main surface opposite to the first main surface; a second electrode (106, 306, 506) having a third main surface facing the second main surface of the first electrode (103, 303, 503) and a fourth main surface opposite to the third main surface; a metal oxide layer (104, 204, 304; 404, 504, 604) disposed between the first electrode and the second electrode and being in contact with the second main surface of the first electrode (103, 303, 503) and the third main surface of the second electrode (106, 306, 506); and an insulating film (107, 307) covering at least a part of the first electrode (103, 303, 503), a part of the second electrode (106, 306, 506), and at least a part of the metal oxide layer (104, 204, 304; 404, 504, 604), wherein at least a part of the fourth main surface of the second electrode (106, 306, 506) is not covered with the insulating film (107, 307) and is exposed to the gas; the metal oxide layer (104, 204, 304; 404, 504, 604) has characteristics of decreasing the resistance value of the metal oxide layer (104, 204, 304; 404, 504, 604) when the second electrode (106, 306, 506) is in contact with the gas molecule; the metal oxide layer includes a local region (105, 305, 505) being in contact with the second electrode (106, 306, 506); and a degree of oxygen deficiency of a metal oxide contained in the local region (105, 305, 505) is larger than a degree of oxygen deficiency of a metal oxide contained in the portion other than the local region (105, 305, 505) in the metal oxide layer (104, 204, 304; 404, 504, 604).