It meant Rodgers suffered a 1-2 defeat at his former club in the English Premier League (EPL).
Watford clinched victory in the second minute of added time as Troy Deeney latched on to a poor goal kick by Leicester goalkeeper Kasper Schmeichel.
He fed substitute Gray who held his nerve to score.
Watford had taken the lead through Deeney in the fifth minute.
The striker got his body across Wes Morgan and rose well to head home Gerard Deulofeu’s whipped ball from a free kick.
This resulted to his first goal in 10 matches at Vicarage Road.
Leicester responded after the break as Jamie Vardy ran onto a fine through ball from midfielder Youri Tielemens.
He dinked his finish over Watford goalkeeper Ben Foster for his 10th league goal of the season.
In spite of conceding an early goal, Leicester looked lively as the first half wore on.
But they were unable to convert their good build-up play into clear chances, as Watford comfortably maintained their defensive discipline.
Watford began the second half on the front foot as Deulofeu combined well with Roberto Pereyra to tee up Abdoulaye Doucoure whose curling shot from distance was swatted away by Schmeichel.
Vardy, who endured a heavy collision with Foster earlier in the match, was substituted minutes after scoring as he appeared to suffer a delayed reaction to the knock.