A device for driving an inverter having a semiconductor switching element, the device comprising: an operation unit which is configured to calculate a surge voltage based on at least a temperature, a current command current value, and a battery voltage of the semiconductor switching element; and a gate voltage application unit which is configured to apply a gate voltage to a gate of the semiconductor switching element, the gate voltage application unit controlling increase and decrease of the gate voltage based on a comparison result between the surge voltage which is calculated and an element breakdown voltage of the semiconductor switching element, wherein the gate voltage application unit is configured to set the gate voltage to a value which is lower than a reference value or a value which is still lower than the gate voltage which has been increased or decreased, when a temperature of the switching element is equal to or less than a predetermined threshold temperature, the gate voltage application unit is configured to set the gate voltage to a value which is lower than a reference value when a temperature of the switching element is equal to or less than a predetermined threshold temperature and when an electric current flowing in the switching element is equal to or less than a predetermined threshold current, the gate voltage application unit is configured, when a temperature of the switching element is equal to or less than a predetermined threshold temperature and the electric current flowing in the switching element is not equal to or less than the predetermined threshold current, to control the gate voltage to a value which is higher than a predetermined reference value when the surge voltage is less than the element breakdown voltage and a difference between the surge voltage and the element breakdown voltage exceeds a predetermined threshold voltage, and sets the gate voltage to the reference value when the surge voltage is less than the element breakdown voltage and a difference between the surge voltage and the element breakdown voltage is equal to or less than the predetermined threshold value. an operation unit which is configured to calculate a surge voltage based on at least a temperature, a current command current value, and a battery voltage of the semiconductor switching element; and a gate voltage application unit which is configured to apply a gate voltage to a gate of the semiconductor switching element, the gate voltage application unit controlling increase and decrease of the gate voltage based on a comparison result between the surge voltage which is calculated and an element breakdown voltage of the semiconductor switching element, wherein the gate voltage application unit is configured to set the gate voltage to a value which is lower than a reference value or a value which is still lower than the gate voltage which has been increased or decreased, when a temperature of the switching element is equal to or less than a predetermined threshold temperature, the gate voltage application unit is configured to set the gate voltage to a value which is lower than a reference value when a temperature of the switching element is equal to or less than a predetermined threshold temperature and when an electric current flowing in the switching element is equal to or less than a predetermined threshold current, the gate voltage application unit is configured, when a temperature of the switching element is equal to or less than a predetermined threshold temperature and the electric current flowing in the switching element is not equal to or less than the predetermined threshold current, to control the gate voltage to a value which is higher than a predetermined reference value when the surge voltage is less than the element breakdown voltage and a difference between the surge voltage and the element breakdown voltage exceeds a predetermined threshold voltage, and sets the gate voltage to the reference value when the surge voltage is less than the element breakdown voltage and a difference between the surge voltage and the element breakdown voltage is equal to or less than the predetermined threshold value.