The gingiva on the buccal side of the upper teeth is innervated by the anterior, middle, and superior alveolar nerves, which also innervate the adjacent teeth. Gingiva on the palatal (lingual) side of the same teeth is innervated by the nasopalatine and the greater palatine nerves:
The nasopalatine nerve innervates gingiva associated with the incisor and canine teeth.
The greater palatine nerve supplies gingiva associated with the remaining teeth.