In class, Mary reveals to the teacher, Bonnie Stevenson (Jenny Slate), that her math skills are far beyond the average second-grader's — and the school's principal (Elizabeth Marvel) insists she can get Mary a scholarship to a prestigious school for gifted children. Frank resists this suggestion, because he believes such a school would rob Mary of the joys of childhood.
His reasoning is grounded in the story of Mary's mother, Diane — a math genius who was pushed to academic greatness by their mathematician mother, Evelyn ("Birdman's" Lindsay Duncan). Diane committed suicide at 27 and left her then-baby daughter in Frank's care.
Evelyn, living in Boston, gets wind of Mary's math skills and believes she can become the third generation of great mathematicians. Thus begins a courtroom battle for custody.
Director Marc Webb ("(500) Days of Summer," the Andrew Garfield "Spider-Man" movies) takes Tom Flynn's screenplay (which was on The Black List, a Hollywood compilation of noteworthy unproduced scripts, in 2014) and polishes it into a small gem. With some side trips (such as a romance between Frank and Bonnie), the movie coalesces around its makeshift family — Frank and Mary as a loving parent and child, with Spencer's Roberta acting more the grandmother than her blood relation, Evelyn — and spins out a touching drama about the dangers of conflicting expectations of a child's future.
The movie is blessed with a solid cast, particularly Evans in the lead as a single man who has sacrificed much to do right by his niece. Grace is a scene-stealer, smart and savvy, and possibly the most natural performer her age (she's 10) since Tatum O'Neal.
"Gifted" occasionally takes some predictable turns, notably in the final half-hour. Like a mathematical proof, the solution seems obvious in retrospect — but the way one gets there is what's fascinating.