Gomm joined Sir Arthur Wellesley's army, again as assistant quartermaster-general, and fought at the Battle of Roliça and the Battle of Vimeiro in August 1808 during the Peninsular War. After the Convention of Sintra Gomm returned to Portugal and served on Sir John Moore's staff at the Battle of Corunna in January 1809. Gomm was also on the Earl of Chatham's staff during the disastrous Walcheren Campaign of Autumn 1809.