He was the third son of the Reverend Edmund Gilbert, Vicar of Constantine and Rector of Helland, Cornwall, and his wife, the daughter of Henry Garnett of Bristol. Like Sir Humphrey Gilbert, he was a member of the Devon family of Gilbert of Compton and he was named after Sir Humphrey's stepbrother Sir Walter Raleigh. He gained a cadetship in the Bengal Infantry in 1800, and in September the following year was posted to the 15th Bengal Native Infantry as ensign. Arriving in India in October 1801, he then became Lieutenant on 12 September 1803 and Captain on 16 April 1810. Participating in the defeat of Perron's brigades at Koil, Aligarh, the battles of Delhi, Laswari and the storming of Agra. He also attracted the attention of Lord Lake by his participation in the four unsuccessful attacks on Bharatpur. In 1814, in Calcutta, he married Isabella Rose Ross, the daughter of Thomas Ross, a major in the Royal Artillery - the marriage produced Sir Francis Hastings Gilbert, 2nd Baronet in 1816, Geraldine Adelaide. Next he was successively Barrack-Master and Cantonment Magistrate at Cawnpore, Commandant of the Calcutta native militia, and Commandant of the Ramgarh local battalion. Promoted to Major on 12 November 1820, he then became Lieutenant-Colonel of the newly formed 39th Bengal native infantry in 1824, Colonel of the 35th native infantry and of the 1st Bengal European Fusiliers in 1832, Major-General in June 1838 and finally Lieutenant-General in November 1851. During the First Anglo-Sikh War he commanded a division of Sir Hugh Gough's army at the battles of Mudki and Ferozeshahr, and at Sobraon - Gough mentioned him favourably in his dispatches. He was made a KCB in April 1846 and again commanded a division under Gough in the Second Anglo-Sikh War, at the 1849 battles of Chilianwala and Gujrat before leading his division across the Jhelum River to pursue the remnants of the Sikh army and receiving their surrender on 3 and 6 March. He next pursued the Sikhs' Afghan allies right up to the Khyber Pass, and in reward was appointed GCB in June 1849 and a Baronet in 1850. Becoming known as a sportsman as well as a soldier in India, on his death a memorial obelisk was erected on the Bodmin Beacon, though his baronetcy became extinct on his son Francis's death. Sir Walter is buried on the west side of the southern section of the central north-south path in Kensal Green Cemetery in London.