No, the gecko should not have felt any pain in the loss of its tail.
When a gecko feels threatened, or is grabbed by the tail, it will drop its tail as a defense mechanism (the tail will wiggle on the ground, and hopefully act as a distraction to the threat while the gecko makes its escape). This process is known as autotomy and is a defense mechanism possessed by several gecko species. The connective tissue of the tail is specially adapted to allow the tail to break off at determined fracture planes, these fracture planes are spaced along the length of the tail.
When the tail (or part of the tail) is autotomized, the nerves go through a process called vasoconstriction- this process stops the blood flow to the open part of the tail, thereby preventing the wound from bleeding. The tail will grow back in time, however, it is unlikely to resemble the original