"Going in Style," the 1979 comedy starring George Burns, Art Carney and Lee Strasberg, is treated to a genial, warmhearted upgrade in a remake by director Zach Braff that features Michael Caine, Morgan Freeman and Alan Arkin in roles they slip into like well-worn sweaters.

Written by Ted Melfi, the filmmaker behind the wildly successful “Hidden Figures,” this iteration of “Going in Style” still revolves around three elderly men who pull a bank heist in an attempt, not only to bring in some money, but also to stave off the bitter edge of old age. But Melfi has given the story more cheery uplift, while placing it squarely within the grimmest realities of 21st-century life. As the film opens, Caine’s character, Joe, is battling with his New York bank, which has recently tripled his mortgage payment due to a teaser-rate loophole. Later, he and best buddies Willie (Freeman) and Albert (Arkin) discover that the steel company they worked for is moving overseas and dissolving their pensions.

Today, that act of corporate skulduggery might be solved with one magical-thinking presidential tweet (one of the movie’s executive producers, as it happens, is Treasury Secretary Steven Mnuchin). But within the fanciful recent past of “Going in Style,” it means that three smart, well-seasoned gentlemen will decide to plot their revenge, even while hiding in plain sight as the doddering oldsters everyone keeps taking them for. Continually patronized, underestimated or plainly ignored, Joe, Willie and Albert resemble the heroes of last year’s similarly themed “Hell or High Water” as they seek retribution for their financial woes and social insignificance. Like that movie, “Going in Style” involves banter with a colorful waitress — played by the wonderful character actress Siobhan Fallon Hogan — but because this is an escapist comedy, the gentlemen will also cross paths with a sexy septuagenarian jazz fan (Ann-Margret), a cowardly bank executive (Josh Pais), a skeptical law enforcement officer (Matt Dillon) and an incredulous supermarket manager (Kenan Thompson).

That’s an impressive supporting cast, and they help give “Going in Style” a pleasant, easygoing fizz, even when Braff resorts to such cliches as an old lady launching f-bombs, a low-speed chase on a motorized scooter and a senile space cadet (played by Christopher Lloyd with characteristic slack-jawed weirdness). The forced slapstick moments are balanced with a gallows humor that pervades the entire enterprise, as the men contemplate illness, loneliness and longing.

Most of those observations come by way of Albert, an amateur sax player and well-practiced grump who makes Eeyore look like a cockeyed optimist. As he did in his standout performances in “Little Miss Sunshine” and “Argo,” Arkin infuses his character with just enough sympathy to be bearable, but without begging to be liked, much less loved. Caine and Freeman deliver similarly affecting, well-judged portrayals of men who are grappling with a constellation of disappointments that, as befits their generation, they bear with stoic resignation and fiery resolve. The guys have a habit of calling each other “kid” and “young man,” and each time they do, it sounds like a warning shot across an unseen bow of invisibility, irrelevance and death itself.

It's the chemistry among these three fine actors that keeps "Going in Style" afloat, lifting it from the formulaic and forgettable — which, essentially, it is — and making it genuinely, if modestly, enjoyable. At one point, the partners in crime watch "Dog Day Afternoon," if only as a primer in what not to do when their big day comes. "Going in Style" will never be remembered as a classic of that order, but, as the men who play its crafty central characters know so well, there's something to admire in simply getting the job done — with restraint, professionalism and a few well-earned laughs along the way.

PG-13. At area theaters. Contains drug references, obscenity and some suggestive material. 96 minutes.