With star paceman Jimmy Anderson currently sidelined, Stokes is emerging as one of the keys to England's chances on a marathon tour of the sub-continent which will see them play five tests in India in November and December after wrapping up a two-test tour of Bangladesh.
Stokes was named man of the match after Monday's dramatic finale to the first test in Chittagong which saw England edge home by 22 runs in a nail-biting contest.
In a match otherwise dominated by spin, Stokes took six wickets with a mixture of classic seam and reverse swing that underlined his growing intelligence as a bowler and importance to the pace attack.
But he also scored 85 in the second innings in a sixth-wicket partnership with Jonny Bairstow worth 127 runs which effectively turned the course of the game.
Bayliss said the 25-year-old was still at a relatively early stage in his career but had the potential to be an all-time great.
"It's going to be easier to judge the longer he goes. The potential of the guy – he could be right up there with some of the all-time best allrounders," Bayliss told reporters in Chittagong.
"Only time will tell, but certainly, the strides he's made here on the subcontinent playing spin have been top class. It wasn't all that long ago we were wondering how he might go on spin-friendly wickets, but he's a guy that works extremely hard in the nets."