Melissa McCarthy, one of the highest-paid actresses, once worked at Starbucks and the YMCA

Melissa McCarthy
NBC | NBCUniversal | Getty Images

Melissa McCarthy spent two decades trying to break into Hollywood. After moving from her hometown in Plainfield, Illinois, to New York City at age 20, she racked up credit card debt and, at one point, couldn't withdraw cash from an ATM because her bank account balance was under $5.

She left NYC for Los Angeles in the early 1990s to pursue acting and took jobs at Starbucks and the YMCA because they were walking distance from her apartment. "When I first moved here I didn't have a car, so I had jobs I could walk to," she told Conan O'Brien on Late Night in 2013

It wasn't until 2011, after years of working with theater company Groundlings, that she landed her breakout role in the comedy "Bridesmaids." From there, McCarthy rose quickly: By 2016, she was the second highest-paid actress in Hollywood, according to Forbes. Last year, she was the ninth-highest paid.

"I've gotten lucky," she told Glamour in 2018, "and I've worked hard."

How McCarthy fights for equal pay

McCarthy negotiated her way to the top. As her husband, comedian Ben Falcone, said in the same interview with Glamour, she has "fists of justice" and is relentless about getting the roles and production deals that she wants and deserves.

When approaching any negotiation in Hollywood, "I always think, 'Is the deal fair? Would you be asking the same thing of a guy in this position?'" McCarthy said. "And if the answer is 'It probably wouldn't be happening [to a guy],' I'll dig my teeth in for months."

Before her big break, Melissa McCarthy had less than $5 in her bank account

She's also learned that you have to be willing to walk away. "As you start up the ladder in whatever field you're in, you have to walk if people won't give you what you're worth," she said. "Once people don't respect you enough to give you what you're worth, they're never going to."

As with nearly every single occupation out there, women in Hollywood still get paid far less than their male counterparts.

The world's 10 highest-paid actresses made a combined $186 million before fees and taxes in 2018, Forbes reports. Meanwhile, the highest-paid actor, George Clooney, made more than that amount alone. He earned $239 million before taxes last year.

Forbes' ranking includes extracurricular earnings, and most of Clooney's income actually came from his tequila company, which he sold to Diageo for as much as $1 billion, rather than from onscreen gigs.

Still, a Hollywood pay gap persists, even for A-listers.

As you start up the ladder in whatever field you're in, you have to walk if people won't give you what you're worth.
Melissa McCarthy

"Women, in general, are making four-fifths at best," Oscar-winner Emma Stone said of the Hollywood gender pay gap in a conversation with Out Magazine in 2017. "In my career so far, I've needed my male co-stars to take a pay cut so that I may have parity with them. ... That's something that's also not discussed, necessarily — that our getting equal pay is going to require people to selflessly say, 'That's what's fair.'"

McCarthy's advice is to keep pushing for what you're worth. "There were some jobs when I was paid what most [of my costars were]," she told Glamour. "And then people who climbed the ladder with me were suddenly making 15 times what I made. I was like, 'Wait, wait, wait.' I thought, 'This is based on bulls---. This is not based on anything factual to me.'

"I hated that feeling of not being in control and not being able to do anything about it. I think that feeling is what keeps the fight in me."

Don't miss: Melissa McCarthy wakes up at 4:30 a.m. to watch TV reruns—I tried for a week and it made me miserable

Like this story? Subscribe to CNBC Make It on YouTube!

I woke up at 4:30 to watch TV like Melissa McCarthy for a week—it was terrible