 He was educated at Boulogne, France, from the age of seven (he later kept his diary in French so that the servants could not read it), then at Western Grammar School, Brompton, London, and then at the Great Ealing School, where he became head boy and wrote plays for school performances and painted scenery.He then attended King's College London, graduating in 1856.He intended to take the examinations for a commission in the Royal Artillery, but with the end of the Crimean War, fewer recruits were needed, and the only commission available to Gilbert would have been in a line regiment.