5 Flights Up” is littered with red flags. There’s the voice-over narration by Morgan Freeman, offering commentary so obvious that it should have been left unsaid; there’s Diane Keaton playing the same scatterbrained character she always plays; there are New York stereotypes, including the jerky banker guy and the high-strung real estate lady; and there’s a strange and dreamy soft focus that adds the patina of a Lifetime movie.

And yet, despite its drawbacks, the drama, based on the novel “Heroic Measures” by Jill Ciment, sneaks up on you. It weasels its way into your heart and ultimately claims sweet, sentimental victory over your better judgment.

Keaton plays Ruth, a retired teacher who is married to Freeman’s Alex, a painter. Forty years ago, they moved into their two-bedroom Brooklyn apartment, long before the hipsters descended. But considering the arduous climb to their fifth-floor walk-up, they’re thinking about selling in favor of a building with an elevator. So they put their place on the market — just to test the waters — with the help of their pushy, power-suited niece (Cynthia Nixon), who is sure she can get them $1 million for it.

Nothing, however, could prepare them for the indignities of an open house. Househunters flock by the dozen to cast judgment on every last crown molding, referring to the paintings in Alex’s studio variously as “stuff,” “clutter” and “crap.” “Everyone’s a critic,” he grumbles during one of the script’s low points, when a well-timed facial expression could have done the trick.

But Ruth and Alex are distracted from this major life change by a couple of other events. For one, their terrier, Dorothy, is sick, stuck in a crate at a veterinary hospital with a 60 percent chance of survival. Ruth, in particular, is beside herself. Meanwhile, a man abandons an 18-wheeler on the Brooklyn Bridge, leaving all of New York to worry that the truck is filled with explosives, even though there’s no evidence to suggest so. Knee-jerk hysteria is the city-wide reaction as a manhunt unfolds to find the missing driver.

At first these little detours feel curiously inserted into the narrative, but ultimately they lend an authenticity to the movie, which unfolds at a nicely meandering pace over the course of a couple of days. Amid Keaton’s manic gesturing, life happens: Ruth reads in bed and Alex takes his pills; the pair goes to dinner down the street with a couple of old friends; and they struggle with so much newfangled technology. The small moments really add up to something: a charming portrait of two people who don’t always see eye to eye but who are undeniably on the same team.

They’re a united front against their crazed niece and all the young’uns who treat them like rubes. In a series of flashbacks — yet another problematic method that works against logic — we see that they’ve always been that way. Ruth’s parents didn’t approve of their daughter marrying a black man, but she did it anyway. And when Ruth couldn’t get pregnant, it was Alex who assured her that the two of them were family enough.

It was also Alex who gave Dorothy to Ruth. And when he — a man of modest means despite his high-value real estate holdings — tells the vet that money is no object and to do whatever it takes to save their baby, Ruth is overcome. She looks like she’s falling in love all over again. At that point, there’s no point trying to resist the sweetness of it all. “5 Flights Up” is far from perfect, but it’s also undeniably touching.

PG-13. At area theaters; also available on demand. Contains strong language and depictions of nudity in artwork. 92 minutes.