Sir John Gayer (died 1711) was the East India Company's General from May 1694 to November 1704. The General was in charge of all the Company's affairs in India. He was also the governor of Bombay for the same period. Gayer's tenure was dominated by conflict with the English Company Trading to the East Indies (New Company), set up in 1698. This led to his imprisonment in Surat for many years.
He was the son of Humfrey Gayer, merchant, of Plymouth, Devon, and nephew of Sir John Gayer, Lord Mayor of London. At an early age he entered the service of the East India Company, and rose to be a sea-captain. On being appointed by the owners commander of the ship Society, he was admitted into the freedom of the company on 7 April 1682. On 3 June 1692 he was chosen governor of the port and island of Bombay.
In 1693, when Sir John Goldsborough was appointed General by the Company, Gayer was to succeed him in case of death. He went out in December 1693 as governor of Bombay and General, reaching the Indian coast at Calicut on 5 March 1694, and there hearing of the death of Goldsborough.
In 1699 the forerunners of the New Company were followed by Sir Nicholas Waite (a dismissed agent of the old company) as president at Surat and king's consul. Waite intrigued against the Old Company, and charged his rivals with piracy. The servants of the Old (or London) Company refused to recognise the new men or the authority of Sir William Norris, who came out as William III's ambassador to Aurangzeb. The ambassador arrived on 10 December 1700, convoyed by four king's ships. A contest in bribery began between the agents of the two companies. Gayer left his stronghold at Bombay and came to Swally (Suvali), the roadstead of Surat, to arrange the disputes in which the governor of Surat was involved. He was arrested there, in consequence apparently of Waite's charges.