Williams curled home the set-piece after just two minutes before Josh Murphy levelled five minutes later with a delightful free-kick of his own.
Both sides created a number of openings after the break but neither was able to add to the scoreline as the half ended 1-1.
Boro's best chance of the second half came when Williams sent a pinpoint cross over to Cameron Park, but his lofted effort flew over the bar.
They were made to pay when City took the lead on 65 minutes, Cameron McGeehan making it 2-1 with a glancing header.
Josh Murphy sealed victory for the Canaries after being set-up by his brother, Jacob, rounding off an excellent move 11 minutes from time when firing low past Luke Coddington.Norwich City: Bunn, McNeil, Barker, McGeehan, Gafaiti, Toffolo, Jacob Murphy, Hall-Johnson, Morris, Loza, Josh Murphy. Subs: Matthews, Young, Hodd, Norman, Wyatt.
Boro: Coddington, Bennett (Waters 85), Burn, Jackson (c), Meling, Bradley Halliday, Jones, Park, Fewster, Kitching (Kneeshaw 56), Luke Williams. Subs: Fryer, Okosieme, Rhoden.
*Hayden Coulson has been selected for England U16s squad for their Victory Shield match against Northern Ireland at AFC Bournemouth on Friday November 8.