Wales secured a place in the last 16 by finishing second in a group including Italy, Switzerland and Turkey, setting up a knockout clash with Denmark at Wembley.
Manager Robert Page opted against naming either Williams or Wilson in his starting lineup, but there was a place for former Reds duo Danny Ward and Joe Allen.
It was a busy evening for Ward in goal, with Wales struggling to keep Denmark at bay for large periods of the first half, before Kasper Dolberg’s 28th-minute opener.
Dolberg then doubled his tally soon after the break, and it came via a poor clearance from Williams – who had replaced the injured before half-time – landing straight at the feet of the Nice striker to fire home.
Wales had chances to claw one back, and Williams’ delivery from the right flank was a frequent source of opportunities, but they were unable to make it count.
Page sent Wilson on for Joe Morrell on the hour mark, but despite Wales continuing to probe, Denmark made their superiority count as Joakim Maehle made it 3-0 before stoppage time.
Wilson was then sent off in the 90th minute for a kick out at the Atalanta right-back, and though it was debatable whether it was a red-card challenge, it was a moment of petulance from the 24-year-old.
Barcelona striker Martin Braithwaite scored Denmark’s fourth in the closing stages, as Wales exited the tournament after a 4-0 thrashing.
Williams played 137 minutes at the Euros, over three appearances, while Wilson was limited to just 50 minutes off the bench.
They will now embark on post-season holidays, but are expected to hold talks with both Liverpool and interested clubs as the pair weigh up permanent moves away from Anfield.
If no deals are forthcoming, Jurgen Klopp will welcome both back to Kirkby for pre-season training, with Williams likely to remain part of the first-team squad if he does not push for an exit.