What's the purpose of this resistor into a NOT gate?
It's probably to protect the gate input from voltages outside the range of 0~5V, including ESD. 

The relatively modern 4069UB on your linked datasheet is rated to withstand +/-10mA at the input, which would theoretically represent more than +/-6kV at the input. In practice the resistor would probably flash over and the supply voltage might get lifted to a destructively high voltage for a high positive input voltage via the two resistors shown.