Look for the Comtat on a modern map and you won’t find it! Since 1791 the area has been incorporated within the Vaucluse département but before this it actually belonged to the Pope!
Prior to 1274 the territory on the left bank of the Rhône, technically part of the Holy Roman Empire, belonged to the Count of Provence who was independent of the French Crown. Following the death of Count Alphonso in 1271, the Comtat was passed to the Papacy and became the Comtat Venaissin with Venasque being nominated its capital. Later, in 1320, Carpentras took over this role. Moreover, Avignon was aquired by the Papacy in 1348 and became an enclave within an enclave – it was never officially part of the Comtat Venaissin. See a map of the Comtat here.
Life in the Comtat was apparently quite comfortable for its inhabitants who enjoyed a tax free status. Many Jews and other immigrants, like the poet Petrarch, came here to avoid persecution in other parts of France and Italy.