The funniest—and most lovable—comedy team Hollywood ever produced gets sweetly autumnal treatment in Jon S. Baird’s “Stan and Ollie,” a gentle, affectionate portrait of Laurel & Hardy’s final British tour in 1953-54. The film might play rather loose with the facts behind the story, but it beautifully captures the genial spirit of the pair in their twilight years.

The premise of Jeff Pope’s script is that when the two got together in 1953, it was after a long rift between them, caused by Hardy’s refusal to cut ties with Hal Roach along with Laurel in 1939 and his willingness to make “Zenobia” with Harry Langdon as his new comic partner that year. The reality was quite different, of course: in reality, Laurel and Roach patched up their differences and Stan and Ollie made several more pictures with him before moving elsewhere to make eight more movies together between 1941 and 1945—admittedly inferior to their earlier work—as well as the sad comeback effort “Atoll K” (or “Utopia”) in 1951. They had also done previous British stage tours—if you set aside the first, in 1932 at the height of their fame, they had done a second in 1947 and a third in 1952.

Of course, every story needs conflict, and rewriting the record to provide it is not a mortal sin—especially when it yields such an engaging opportunity for two actors as talented as Steve Coogan and John C. Reilly to play the boys at the end of their careers. So Pope offers the idea that after years of estrangement the duo has been convinced by an enthusiastic but not especially competent impresario named Bernard Delfont (Rufus Jones) to do a tour of the provinces that will include a stop in London. Laurel hopes to take the opportunity to meet with an English film producer for whom he’s been writing a spoof of the Robin Hood legend that would provide a real comeback for him and Ollie: along the way he continually regales his partner with bits he’s thought up in his hotel room at night. Of course, their hopes will be dashed.

As the tour begins, the crowds are sparse, but the boys soldier on, and as they do public appearances to encourage interest, they grow considerably. When they reach London, their current wives—Lucille (Shirley Henderson), Ollie’s third spouse, and Ida (Nina Arianda), Stan’s fourth—join them, and though the two women aren’t exactly simpatico and they sometimes feed their husbands’ old resentments, their support for their mates is real.

As for Stan and Ollie, they repeat routines from their old two-reelers—the one we see most frequently is the egg-peeling bit from “Country Hospital”—and Coogan and Reilly pull them off remarkably well, although isolating them from their context as elements of a series of gags that build on one another in a crescendo of hilarity does them a disservice. Still they—and some new material Stan creates for the act—as well as a few other choice reenactments offer a taste of Laurel and Hardy’s simple but very real gifts that will tickle their admirers and—one hopes—act as an inducement to younger viewers who might not be familiar with their work to go back to the originals. Almost anyone who does will be hooked.

Along the way, of course, there are moments of stress, most notably in an argument the boys get into at an elaborate reception late in the tour—the point at which their simmering animosities finally burst out, however contrived they might be in terms of the actual events. (The guests are so accustomed to the combination of constant bickering and absolute loyalty in their films that they assume it’s all a put-on.) But the real crisis relates to Hardy’s declining health, which certainly was very real; how it plays on screen, however, is embellished for an appropriately sentimental—some will say saccharine—finish.

But while it all turns out just as you’d expect, “Stan & Ollie” doesn’t get clammy or mawkish, not only because Baird treats everything with a relatively light touch but because Coogan and Reilly capture Laurel and Hardy so well. It’s somewhat easier for Reilly, because his makeup is so good (the prosthetics are by Mark Coulier), but the voice and mannerisms are spot-on as well, as is the man’s general attitude of avuncular looseness. Coogan can’t quite duplicate Laurel physically, but he’s got the smile, the eyebrows and the thoroughgoing professionalism of Stan down pat, as well as his longing for the old days. Neither Henderson nor Arianda has much to add, but both bring some welcome spine to the mix, and while both Jones and Huston are playing basically stock figures, they do them well enough.

One also has to admire the work of production designer John Paul Kelly and costumer Guy Speranza, who bring polish to the images of postwar England, and cinematographer Laurie Rose, whose visuals might get a bit precious at times but are always attractive. The editing by Una Ni Dhonghaile and Billy Sneddon keeps things moving while giving Coogan and Reilly time to shine, and Rolfe Kent’s score is nicely supportive.

During their heyday Laurel and Hardy were often dismissed as lightweights (in terms of brilliance, not Hardy’s bulk, of course) by comparison to other silent screen comic stars, but the best of their work retains a freshness and humanity that’s utterly timeless. Their hapless misadventures, which nonetheless never break the bond between them, make them even after the passage of nearly a century an endearing pair to continue hanging out with, and Coogan and Reilly manage to recapture some of the mad magic they made together.