“Bridesmaids” arrives at a low moment in the history of filmed entertainment, when people actually are asking whether women can be funny in American movies — and whether big studios will let them.

At such a low moment, maybe there is no choice but to reclaim the gross and raunchy comedy of bodily functions formerly dominated by man-boy ensembles. Its trailer fairly represents the “Bridesmaids” idea of a set piece — we’ll call it the food-poisoning incident — but leaves an uneasy impression: Ah, at last, the Pyrrhic victory of vomit parity.

Reportedly, and self-evidently, Judd Apatow told Kristen Wiig that if she wrote a good star vehicle for herself, he’d produce it; Wiig and writing partner Annie Mumolo came up with “Bridesmaids,” for Apatow associate Paul Feig to direct. Good for all of them: It takes gutsy genius to make an opportunity from our defeatedly low expectations of a comedy, with a lot of women in it, about an impending wedding.

Wiig’s heroine suffers splendidly through the anguish of becoming a maid of honor for her childhood friend (Maya Rudolph), negotiating the allegedly celebratory but variously demeaning rituals of wedding preparation mostly by screwing them up. Broke and lonely and depressed to begin with, she loses her shitty job and shitty apartment and shitty sub-boyfriend (Jon Hamm) in the process, and eventually, hilariously, loses her shit. (Yes, also literally.)

Fellow bridesmaids include a rich, too-pretty rival (Rose Byrne), a coarse, fat firecracker (Melissa McCarthy), a newly-married naif (Ellie Kemper) and a long-married cynic (Wendi McLendon-Covey). “Bridesmaids” enjoys its reversal of wedding-movie convention — here, all the groom can do is quietly stand around, looking nice — but does get a little flustered trying to transcend the chick-flick formula. In particular and in very different ways, Byrne and McCarthy both get to shine, both intelligently expanding on their given shtick, but Kemper and McLendon-Covey pay for that with their forfeiture of any further development. Wiig meanwhile makes the most of her character getting spooked by real interest from a (requisite) sweet and available man (Chris O’Dowd). The basic compatibility challenge there is that she once ran a bakery that went belly up and he keeps urging her to rise above her resignation and try again. The movie hasn’t figured out what it thinks about a man insisting that this woman’s proper place is in the kitchen.

There is another important Apatow touch: breathing room. Some call it “being too long.” A few bits of “Bridesmaids” do get stretched out on purpose, whether to feel lived-in and emotionally honest or to wring laughs from awkward protraction. Others simply suffer from imprudent or inelegant cutting. But given Hollywood’s prevailing female-phobic wisdom that to be relatable is to be restrained, the general notion of overstaying a welcome seems seductively subversive.

We know the dubious challenge of assimilation within male domination can manifest funny stuff — to wit Tina Fey’s semi-facetious indexing of her own life story in “lurid tales of anxiety and cowardice.” The funniest stuff in “Bridesmaids,” and the most serious, comes from how well Wiig understands the agony of nonconfrontationalism. Her great and sometimes grating question is how to be a true friend to her fellow woman and also true to herself.