A Bollywood movie about a rapper from the slums may sound derivative, but what does that matter when “Gully Boy” revels in high-wattage screen chemistry and an inclusive social message, all served up in a slickly enjoyable production showcasing Ranveer Singh’s many charms? Zoya Akhtar’s most accomplished film to date is a mainstream rap musical about a Muslim guy from working-class Mumbai determined to break free from the strictures of expectation and class, all served up with generous helpings of deftly written hip-hop lyrics and a largely well-woven narrative that’s so likable one can almost forgive how the script barely bothers to resolve an important plot element.

Even though few Bollywood films break through into non-specialized distribution, this one has a better chance than most to become an international crowdpleaser, polishing and semi-pop-ifying the gritty genre for a broader audience as it does. It doesn’t hurt that Nas is credited as one of the executive producers, and the production isn’t shy about dropping his name at key moments. Neither do Akhtar (“Zindagi Na Milegi Dobara”) and co-writer Reema Kagti (“Talaash”) try to pretend “8 Mile” wasn’t partly an inspiration, as testified by a glimpsed photo of Eminem, though Indian hip-hop stars Divine and Naezy are the acknowledged models. In fact, one of the pleasures of “Gully Boy” is in recognizing how the writers take certain formulas — such as the mismatched posse that so often surrounds Bollywood heroes, the exaggerated jealousies of girlfriends, the sacred mother figure, and so on — and give them fresh life via characters effortlessly exuding charisma.

College student Murad (Singh) lives with his family in a crowded tenement in the densely populated Mumbai slum of Dharavi. Tension in the tiny home reaches breaking point when his father Shakir (Vijay Raaz) takes a second wife, played out in a terrific scene in which a fuming Murad puts on headphones and drowns out traditional wedding tunes with A$AP Rocky’s “Everyday.” Murad’s heart is shared equally between rap music and his girlfriend Safeena (Alia Bhatt, “Raazi”), a sharp-witted medical student from a religiously conservative higher caste family who has to hide her relationship from her strict parents.

At a university jam session, Murad meets amateur rapper Sher (impressive relative newcomer Siddhant Chaturvedi), who encourages the hesitant student to perform his own lyrics, brimming with social injustice and the obscenity of the caste system. Possibilities are opening up, but then Murad’s father has an accident and forces his son to take his place as a chauffeur for a rich family. The pressures are huge: finish school, work on his raps, drive around the entitled employers, and try to steal some time with Safeena.

Once his father is back on the job and Murad graduates, the idea is for him to work in his uncle’s office; for Shakir, it represents the pinnacle of what can be expected from the son of a lowly servant. However, Murad’s plans have started to soar under Sher’s encouragement, and the pair record a rap video in the neighborhood that goes viral. Rich wannabe music producer Sky (Kalki Koechlin) sees the video and offers to fund a professional recording session around the same time that Nas announces he’s sponsoring a rap battle where the winner will be his opening act.

Naturally, Safeena gets crazy jealous of Sky, and of course there’s a break up more or less at the moment when Shakir’s violence against Murad’s mother Razia (Amruta Subhash) and Murad himself comes to a boil, forcing them to flee. Here’s when one of the side plots really goes off the rails: to earn much-needed money, Murad joins up with his buddy Moeen (Vijay Varma), a smalltime drug dealer and car hijacker. Moeen’s a nasty character who happily employs kids to do his dirty work, so the friendship simply doesn’t make sense, and the script’s way of awarding him redemption at the very end is both nonsensical and misguided.

It also adds nothing to the treatment of caste and expectation, which elides with the film’s major theme: Dream big. Murad feels the disparity around him, rebels against his father’s attempt to limit his horizons in the name of tradition, and refuses to end his relationship with Safeena just because her family comes from another class. Similarly, Safeena won’t give up Murad and plays the game of being the dutiful hijab-wearing daughter (she’s an expert prevaricator) until such time as she and her loved one can be independent.

One of the joys of “Gully Boy” is reveling in the chemistry between Singh and Bhatt, perfectly paired: Her ironic smile meets his open-faced grin and the screen lights up. Sure Singh is about 10 years older than his character, but he has the boyish charm to pull off the role, and he raps like a pro to boot. Musical numbers are expectedly energetic, many featuring words by the director’s famed writer-lyricist father Javed Akhtar that fit the message like a glove. Contemporary Indian rappers add a note of authenticity but there’s no denying who’s the star of this show. For the record, “gully” means “street,” and “Gully Boy” becomes his moniker.