Bayliss, the England coach, made the comments after Stokes helped seal victory with 103 runs and six wickets in the match. Bayliss was particularly impressed with Stokes' improvement against spin bowling on the sort of low, slow pitches on which he has struggled in the past.
Coming to the crease in the second innings with England precariously placed on 46 for 4, Stokes compiled 85 in just over three hours with his trademark power complemented by some tight defence and mature rotation of the strike. He also gained reverse swing and generated impressive pace on a sluggish surface.
"He could be right up there with some of the all-time best allrounders," Bayliss said. "He's young into his career and that's going to be easier to judge the longer he goes. Only time will tell.
"But the strides he's made 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.
"It's his defence to spin that has improved out of sight. We know that if he gets a bad ball he can hit anything over the fence, but you've got to be there to get that loose ball. In the past he probably hasn't had a lot of footwork, has played from the crease and backed his eye and his hands. But as we've seen on this tour, in the one-dayers and this Test, he's defended really well off the front foot, got right out and smothered the ball before it had a chance to spin and jump past the outside edge."
It is not the first time Stokes has won high praise from an international coach. During England's tour of the Caribbean in 2015, the then West Indies coach, Phil Simmons, remarked that Stokes was "in the mould of Jacques Kallis" and wished "I had him at No. 6…. That's the kind of cricketer you need."
There will be those that scoff at such comments. They will point out that Bangladesh are rated as the ninth-best team in the ICC's rankings and suggest that conclusions over Stokes' worth are postponed until he has achieved success more consistently and against higher-ranked sides. But a reflection on some of the great allrounders' best performances in Asia over the last half-century (see sidebar) underlines the impression that Stokes' performance in Chittagong is worthy of some respect. Perhaps the next few weeks in India will define Stokes' reputation in such conditions.
There may also be an element of psychology in Bayliss' comments; hearing such praise from his coach can do Stokes' confidence no harm. But there can be little arguing with the allrounder's value to the team. So much so that, while England are considering rotating other players, Bayliss feels it is likely that Stokes will, fitness permitting, play all seven Tests before Christmas. Moeen Ali is viewed similarly by the management.
"Stokes is very important," Bayliss said. "He allows us to play that extra spinner and the third pace bowler. Mo batting at No. 5 plays a similar role to us, especially here in the subcontinent, and the way he played in the first innings, he is suited to playing spin bowling.
"We don't want to get halfway through the India series and have one or two guys injured and definitely out. And we also want to give those guys who will probably play at some stage some game time.
"But it would be a brave man to bet against Stokes playing all seven Tests. I'm not sure we'd be game enough to drop him anyway; we might get a thump in the head. He's a very resilient person, let alone cricketer, and he just keeps on keeping on. We've just got to watch what he does between the Tests to make sure he is available for all the matches."
While other players might be equally reluctant to miss a Test - "you would expect no less from a professional cricketer," Bayliss said - it does seem England are committed to changes ahead of the second Test in Dhaka. Steven Finn, who has impressed with his rhythm and pace in training, could well come in for Stuart Broad or perhaps Chris Woakes, and Zafar Ansari may come in for Gareth Batty or perhaps Adil Rashid.
England are keen to reiterate no-one is being dropped - Broad bowled an especially impressive spell towards the end of the first Test, including nine consecutive overs at the end of the fourth day - but may feel that Rashid, who was not at his best in Chittagong, would benefit from another bowl ahead of the India series.
Ultimately, the decision over who plays in Dhaka may come down to the England management's view of the pitch: if it looks like it will turn sharply, Rashid may be left out on the basis that the other bowlers will gain enough purchase. But if it looks flat, he will play as he can gain turn on surfaces they cannot. Bayliss, like Cook, is reluctant to field a fourth spinner and is not considering changing the batsmen.
"It's a bit like playing five pace bowlers on a green seamer," he reasoned. "If three or four can't do the job... Remember, we've got Joe Root who can bowl decent spinners as well.
"I don't think there's any reason to change the top six at this stage. The top four guys found it very difficult against the new ball facing the spinners. That was very difficult facing good spin bowlers on a wicket which sometimes bounced up around your shoulder and sometimes skidded straight through. I'm sure all the batters will be better for it."