The visitors took a seventh-minute lead when Giorgi Chakvetadze's penetrating run down the right found Edo Kayembe, who pulled the ball back from the byline for Luca Kjerrumgaard to fire home from six yards.
But City were level in the 36th minute when Scott Twine powered a close-range header past Egil Selvik from an inviting Adam Randell cross from the right.
A draw looked the likely outcome, but Ngakia had other ideas, finding the top corner with a sweetly-struck right-footed shot when the ball was cleared into his path 25 yards out.
The result saw Watford leapfrog their opponents in the table and move to within three points of the top six. With some tough fixtures ahead, the Robins now face an uphill battle to achieve their play-off dream.
Gerhard Struber's side are badly hit by injuries to central defenders and named George Tanner and Neto Borges either side of recent signing Noah Eile.
Watford were able to recall defender Saba Goglichidze to a back four.
A compelling first half saw both sides create chances. Bristol City dominated possession but were often too deliberate in their build-up, while Watford had the pace to threaten on the break.
Ross McCrorie and Tomi Horvat forced diving saves from Selvik, but at the other end the Hornets went close to taking a 2-0 lead when Goglichidze's header from a free-kick rebounded off a post into the arms of City goalkeeper Radek Vitek.
Watford's Socceroos striker Nestory Irankunda sent a swerving shot from 25 yards inches wide before Twine's equaliser and the final action of the half saw the impressive Horvat have an effort deflected for a corner.
Vitek came to City's rescue after 56 minutes when he stretched full-length to his right to tip an Imran Louza shot around a post.
Struber responded by sending on Sinclair Armstrong and Max Bird for Emil Riis and Twine.
Irankunda volleyed over from a Kayembe cross as Watford continued to threaten before Armstrong fired over at the other end from a Horvat pass.
Ngakia's thunderbolt stunned home fans.
Although McCrorie and Bird fired over in the closing stages and Bird had a header well-saved by Selvik, the hosts could not summon up another leveller and it was a hard-earned second win in charge for new Watford boss Ed Still.