The Hornets had struggled to create chances after starting with a 4-2-3-1 formation, with Roberto Pereyra and Richarlison not having a significant contribution in the final third.
Both players were taken off within 10 minutes of the second half getting underway, as Gracia switched to 4-4-2 with Okaka and Kiko Femenia coming on.
Gracia said: “I think it was the moment to change in the second half, taking out Roberto and Richarlison and putting on Kiko and Stefano.
“It was a change to play with two strikers, to have more chances to score and maybe we'd had a lot of short passes but, in that moment, with more distances it was the time to play that way.
“Stefano, all the team worked hard and helped us to get these three points."