The excellent Esmael Goncalves had pulled the home side level but despite some decent second-half pressure, they were unable to find a second equaliser.
Celtic went ahead after James Forrest scuttled to the byline before delivering a fine cross which allowed the crouching Ledley - in splendid isolation - to glance a header into the far corner (5).
Emilio Izaguirre got his angles all wrong in trying to deal with John McGinn's long cross and could only head the ball past a bemused Fraser Forster, presenting Goncalves (13) with a gift which he gratefully accepted.
Goncalves then fired wide but Celtic regained the lead as Forrest and Gary Hooper worked a short corner routine and Stokes (21) was on hand to supply a simple finish at the far post.
Adam Matthews tumbled in the box but cries for a penalty were muted before Stokes hooked into the side-netting as Celtic looked to extend their advantage.
Hooper looked certain to score when he burst clear but Samson managed to deflect his thumping effort onto the bar.
Goncalves looked to make the visitors pay for their profligacy but his effort on the stretch was straight at Forster.
The Celtic goalkeeper then showed his quality as he flew across his goal late on to palm away Graham Carey's 25-yard free-kick, a save which guaranteed the 35-time winners a place in Monday's draw for the last four.