The word "doctor" could be used to describe a number of different professions, although early in the 19th-century it was generally only used as a form of address for a doctor of divinity. Physicians with university degrees, who could also be addressed as "doctor," had more prestige and status than other medical professions -- such as "apothecaries" or "surgeons."
An apothecary sold drugs, mixed medications and dispensed medical counsel. A surgeon, on the other hand, dealt with the structure of the body: setting broken bones, doing dental work and dealing with lacerations and skin conditions. Most general practitioners were doubly-qualfied as apothecary-surgeons. They were educated in their field through an apprenticeship. A doctor's home office was called a "surgery" (even if the doctor was not a surgeon).
Like Mr. Gibson, most doctors made housecalls and practiced from their surgery. In Wives and Daughters, the townsfolk of Hollingford speculate about Mr. Gibson's background and education. In Part One, Chapter III, Gaskell explains that he was brought to Hollingford by the town's aged doctor as a partner, but that his status quickly outclasses Mr. Hall's:
...But somehow things had changed since Mr. Gibson had become 'the doctor' par excellence at Hollingford. The Miss Brownings thought that it was because he had such an elegant figure, and 'such a distinguished manner;' Mrs Goodenough, 'because of his aristocratic connections' - 'the son of a Scotch duke, my dear, never mind on which side of the blanket' - but the fact was certain; although he might frequently ask Mrs. Brown to give him something to eat in the housekeeper's room - he had no time for all the fuss and ceremony of luncheon with my lady - he was always welcome to the grandest circle of visitors in the house. He might lunch with a duke any day that he chose; given that a duke was forthcoming at the Towers. His accent was Scotch, not provincial. He had not an ounce of superfluous flesh on his bones; and leanness goes a great way to gentility. His complexion was sallow, and his hair black; in those days, the decade after the conclusion of the great continental war, to be sallow and black-a-vised was of itself a distinction;' he was not jovial (as my lord remarked with a sigh, but it was my lady who endorsed the invitations), sparing of his words, intelligent, and slightly sarcastic. Therefore he was perfectly presentable...
An apprenticeship was a common means of learning a profession or trade. A person would be contracted at a young age (as young as age ten for some trades), a fee was paid to the professional and legal agreements signed. The apprentice was legally bound to work obediently for a specified period of time while the master was obligated to provide room and board and to act as teacher to his pupil. Five to seven years was a typical term of apprenticeship.
Mr. Gibson had two pupils apprenticed to him; it is Mr. Coxe's professed love for Molly that encourages Mr. Gibson to send her to Hamley Hall for a long visit.
From Wives and Daughters, Part One, Chapter III
Three servants would not have been required if it had not been Mr Gibson's habit, as it had been Mr Hall's before him, to take two 'pupils,' as they were called in the genteel language of Hollingford, (apprentices,' as they were in fact - being bound by indentures, and paying a handsome premium' to learn their business. They lived in the house, and occupied an uncomfortable, ambiguous, or, as Miss Browning called it with some truth, 'amphibious' position...