Former potato farmer Gilbert, 34, is enjoying the best season of his career and was a runner-up at the International Championship in China in November.
The Tamworth man secured his place in the main draw for Sheffield with victory over Jack Lisowski in the final qualifying round on Wednesday.
O’Sullivan, 40, is the favourite for the Crucible title, having already triumphed at the Masters and Welsh Open this year.
Their clash will start on Sunday.
Defending champion Stuart Bingham begins his challenge on Saturday with a tough opener against two-time beaten finalist Ali Carter.
Other highlights of the first-round draw include the all-Scottish clash of Stephen Maguire and Alan McManus, Judd Trump’s match against Liang Wenbo and a repeat of last year’s quarter-final between Shaun Murphy and Anthony McGill.
Four-time champion John Higgins plays Ryan Day first, Mark Selby tackles Robert Milkins, while China’s former world number one Ding Junhui, who was widely considered the qualifier best avoided, was handed a tie against Martin Gould.
Former world champions Mark Williams and Graeme Dott go head to head.
The only debutant in this year’s tournament, Birmingham’s Mitchell Mann, will play former semi-finalist Mark Allen.