The movie is reasonably closely based on true events: Ramanujan's staggering output of unproven formulae continue to astound mathematicians to this day (and, as time has passed, the vast majority of them have been proven correct).
Dev Patel plays Srinivasa Ramanujan, a young uneducated Indian man living in poverty who does advanced maths inspired by his goddess. Extremely advanced maths: one of his employers sends his work to G.H. Hardy (Jeremy Irons) at the University of Cambridge, where Hardy initially assumes this is a prank played by one of the other math professors. Having realized the truth, he has Ramanujan invited to Cambridge. But it's not easy for an Indian to live in the U.K., particularly arriving just before the start of the First World War. Hardy was a rigorous mathematician and atheist, while Ramanujan was extremely religious and relied heavily on intuition, so they clashed rather badly on how to proceed on occasion. Ramanujan was also haunted by ill health, and separation from his family.
I was fascinated by the story, but significantly put off by Patel's performance: his face doesn't move much, and he spends most of the movie looking put-upon. Not surprisingly, Irons was very good - he pretty much saved the picture. A really interesting story marred by a mediocre performance by Patel.