Gilbert's father was a naval surgeon and he spent much of his youth touring Europe before settling down in London in 1849. His parents were distant and stern, and he did not have a particularly good relationship with either of them. Following the breakup of their marriage in 1876, his relationships became even more strained, especially with his mother. In the late 1850s and early 1860s, he began a career as a barrister, supplementing his income and indulging his creative side with the publication of several short poems using the childhood nickname "Bab" for which the poems have become known as the Bab Ballads.
In 1863, he wrote his first professional play, Uncle Baby, which ran for seven weeks. This represented his only dramatic success until 1866 when he had a burlesque and a pantomime produced. The following year, he married Lucy Agnes Turner. Following their marriage, he began to turn his attention more and more to writing for the stage and directing his work so that it would resemble his vision. Gilbert became a stickler that his actors interpret his work only in the manner he desired.
In 1871, John Hollingshead commissioned Gilbert to work with Sullivan to create the operetta Thespis for the Gaiety Theatre. This proved to be a false start in the men's collaborative efforts. It would be another four years before the men worked together again. Gilbert and Sullivan's real collaborative efforts began in 1875 when Richard D'Oyly Carte commissioned them to write a one act play, Trial by Jury. The success was so great that the three men formed an oftentimes turbulent partnership which lasted for twenty years and fourteen operettas.
While working with Sullivan on the Savoy Operas, Gilbert continued to write plays to be performed elsewhere, both serious dramas (i.e. The Ne'er-Do-Weel, 1878) and more humorous works (i.e. Foggerty's Fairy, 1881).
Gilbert and Sullivan had many rifts in their career, partly caused by the fact that each saw himself allowing his work to be subjugated to the other's, partly by their gap in social status. (Sullivan was knighted after The Pirates of Penzance; Gilbert's family was lower in the social order and he was not recognized.) In any event, Gilbert filled his plays with a strange mixture of cynicism about the work and "topsy-turvydom" in which the social order was turned upside down. This later, particularly, did not go well with Sullivan's desire for realism, (not to mention his vested interest in the social order as it was).
In 1893, Gilbert was named a Justice of the Peace in Harrow Weald. Although he announced a retirement from the theatre, he continued to produce plays up until the year of his death. On May 29, 1911, he was giving swimming lessons to two young ladies at his lake when one of them began to flail around. Gilbert dived in to save her, but suffered a heart attack in the middle of the lake.