Gilbert took a tactical first frame 65-14 before a break of 60 was enough to open up a two frame advantage.
The ‘Jester from Leicester’ levelled the tie with runs of 62 and 38 before making an 88 in the fifth frame to take the lead but Gilbert roared back with an 65 to ensure the semi-final went to a decider.
Selby ensured his place in the final with a break of 111 where he will face namesake Williams.
Williams, who overcame Stuart Bingham 4-2 in his quarter-final, was also taken the distance by Gary Wilson.
Wilson took three of the first four frames to open up a 3-1 advantage to put himself in touching distance of a spot in the final but former world champion Williams ground out a tactical fifth 68-19 before breaks of 71 and 63 confirmed his spot in the final.
Mark Selby 4 - 3 David Gilbert
Mark J Williams 4 – 3 Gary Wilson