Gomes has made 122 appearances for the Hornets and his new deal will run until June 2019.
"Watford FC is delighted to announce that goalkeeper Heurelho Gomes has signed a new two-year deal with the club," a club statement read.
"The 36-year-old has put pen to paper on a contract which takes him through to June 2019."
The Brazilian joined Watford from Tottenham in 2014 and has become a fans' favourite at Vicarage Road.
The 36-year-old was voted the club's player of the season in 2016 and has won the players' player award for the last two seasons.