Burnley began brightly as Chris Wood headed home inside the opening two minutes, but it did not count as the assistant's flag went up for offside.
At the other end, Hornets captain Troy Deeney headed past the far post before Nick Pope kept out two shots from Pereyra.
Neither side could break the deadlock come the half-time whistle but Watford went on to draw first blood just after the hour, Pereyra tucking home after Will Hughes's initial effort was blocked into the path of the Argentine.
Two Burnley goals in the space of three minutes turned the game on its head, however, as Vokes pounced on Adrian Mariappa's miscued header to poke home the equaliser just seconds after replacing Georges-Kevin Nkoudou.
Cork then forced Westwood's header across goal into the back of the net to put the Lancashire side in front, and Dyche's side held firm to claim all three points.
WATFORD (4-2-3-1): Karnezis; Janmaat (Okaka 76'), Prodl, Mariappa, Holebas; Capoue, Doucoure (Carillo 85'); Femenia, Hughes (Richarlison 85'), Pereyra; Deeney
BURNLEY (4-4-2): Pope; Lowton, Long, Tarkowski, Ward; Lennon (Hendrick 81'), Cork, Westwood, N'Koudou (Vokes 70'); Barnes, Wood