Eva Longoria is almost certainly not who you think she is. Like many actors, she is known for one particular role – in her case, the flighty, fabulous former model Gabrielle Solis, the character she played in the TV comedy-drama Desperate Housewives. Filthy rich, with a penchant for topless gardeners and designer labels, Gaby filled the void left by Sex and the City in the early 2000s.

While playing her, Longoria was busy studying for her masters, writing a thesis about the necessity of having more Latinas – women of Latin American descent – in careers in science, technology, engineering and maths (Stem) in the US. She is deeply political, outspoken and now successful behind the camera, scheduled to direct two feature films next year. This is the first time a Latina will be the director of two major studio films, and she fought off stiff competition from almost 30 other directors to make one of them, Flamin’ Hot, a biopic of the Mexican businessman behind Flamin’ Hot Cheetos. “You have to go in the room triple prepared,” she says, “more educated on the subject, and with more bells and whistles than any man.”

We meet at the Beverly Hills mansion that Longoria, 44, shares with her third husband, the Mexican media mogul José Bastón and their one-year-old son, Santiago. Aside from Desperate Housewives, Longoria is known for starring in a handful of unremarkable films such as the romcoms Over Her Dead Body (2008) and Overboard (2018) and adverts for L’Oréal and Sheba. But she says her life’s work revolves around some of the themes she explored in her masters.

Longoria’s mother was a special education teacher, her sister has special needs, and her earliest memory is of volunteering, aged four, at the Special Olympics. “I remember being a ‘hugger’,” she says. “That was a job – and I was like: ‘This is the best job in the world.’” She traces her interest in philanthropy to her family background and, in 2012, the year Desperate Housewives finished, launched a foundation that offers mentoring, scholarships and business training to Latinas.

As a Mexican-American, growing up in Texas, Longoria faced specific barriers. “Colourism is in a lot of cultures,” she says. “You know, this myth that the lighter you are, the better you are.” As a child, she was significantly darker than her three sisters. “I had dark hair, dark skin and dark eyes. I didn’t look like anybody in my family.”

Did she feel discriminated against? “I remember climbing on the school bus and seeing a sea of blond people and somebody whispering: ‘She’s Mexican.’ I was like: ‘Well, I’m American, I don’t know what that means,’ but I knew it was intended to be negative. I was almost leaning into my heritage after that, because I wanted to be proud of it and everything that my culture represents.”

I wonder whether she thinks the situation in the US is better or worse today. “That’s a good question,” she says. “There was progress and change in our country and then all of that was dismantled with the current administration. I feel like every time you have two steps forward, you have two steps back. There is not a lot of opportunity for disenfranchised communities today.”

Longoria at the Climate Change and Economic Opportunity panel at Florida University in 2016. Photograph: Alexander Tamargo/Getty Images

In August, 22 people were killed in a mass shooting at a Walmart in El Paso – the deadliest attack on Latinos in recent US history. Longoria was part of the You Are Not Alone campaign, a love letter to the Latino community signed by 250 entertainment and industry leaders, including Jennifer Lopez and Ricky Martin. When she was given an award for this work, she quipped: “As a ninth generation ‘Texican’, I’m more American than Donald Trump.”

“It’s a scary time for Latinos in the United States because we’re being villainised,” she says. “A lot of my philanthropic efforts are at the border, trying to make sure families are not separated, babies are reunited with their mothers and children aren’t put in cages. The family separation policies are horrendous, so that’s where I want to put more focus.”

Longoria says she went into a “depression” when Trump was first elected in 2016. “I did put my head in the sand. I took a break for about two years. But you can’t give up. So when the mid-terms came along, I participated in helping people get elected to change the way our government looks. It should reflect reality, which is people of colour and women. Making sure it reflects society is going to be my lifelong struggle.”

She is worried about next year’s presidential election. “The stakes are really high. Globally, the level of intolerance has risen everywhere … I think the most powerful part of our democracy is the citizen. If we can aggregate enough citizens who love as strongly as those who are spewing hate, we have a chance.”

Who is she backing? “Nobody yet, because we’re in the primaries and there are 180 people in the primaries right now,” she says, exaggerating just a little. “But I will back whoever the Democratic nominee is, for sure.”

Longoria’s time is so taken up with politics, I wonder if she has considered getting more involved. She looks at me blankly. “I am involved.” What about running for Congress? “People think that in order to create change, you have to be a politician,” she sighs. “That’s a myth. You can be anybody. You can be a concerned mother and create significant change. Politicians get their hands tied with the bureaucracy of what comes with being a politician as opposed to speaking their truth and their mind and not being beholden to special interests.”

When she was working as an actor, she says, she realised she was not reaching her full potential. “I would say my lines and leave. I didn’t get a say in who my co-star was, pick the words coming out of my mouth or what take they were going to use. That’s why I became a producer – to have control of the final product.”

She notes that her acting experience was pretty typical – “it’s not like anybody was abusive” – and says she still loves being an actor. But over the past decade, her attention has turned increasingly towards directing and producing. “People think I’m an actor-turned-director and producer, but I think I was always a director/producer who happened to fall into acting. I’ve been directing TV for 10 years.” Her work includes episodes of the hit comedies Jane the Virgin and Black-ish, and she has produced two documentaries about agricultural labour, The Harvest (2010) and Food Chains (2014).

In Desperate Housewives, Longoria starred alongside Teri Hatcher, Felicity Huffman and Marcia Cross, and when the show was at the height of its success, rumours abounded of behind-the-scenes rivalry and bullying. Longoria recently referred to an unnamed co-worker in a letter of support she wrote for Huffman when Huffman became embroiled in the college admissions scandal in the US, eventually convicted for paying thousands of dollars to boost her daughter’s university admission score.

“I dreaded the days I had to work with that person because it was pure torture,” wrote Longoria, “until one day, Felicity told the bully ‘enough’ and it all stopped. Felicity could feel that I was riddled with anxiety even though I never complained or mentioned the abuse to anyone.” The day we meet, Huffman has been released from prison after serving 11 days of her 14-day sentence, but Longoria won’t be pressed on the matter. “You can ask,” she says, “but I won’t answer.”

Longoria is a founding member of Time’s Up, formed in January 2018 in response to the allegations against Harvey Weinstein and the growing strength of the #MeToo movement; more than $22m (£17m) has been raised for its legal defence fund. “The greatest success of Time’s Up is creating a global conversation about inequality in the workplace,” she says. “That’s a big accomplishment to bring it out of the shadows and have somebody in France go: ‘I thought that was just here. That’s happening in Brazil?’ And someone in Brazil going: ‘That’s happening in the United States?’” Longoria is due to produce, direct and star in the film 24/7 alongside Kerry Washington next year, a workplace comedy set in a post-Time’s Up world, “making fun at the expense of men, finally,” she says.

Longoria with Natalie Portman at the Women’s March in Los Angeles in 2018. Photograph: Startraks/Rex/Shutterstock

I ask if she feels there has been significant change when it comes to sexual harassment and discrimination in the past few years. “In the US, we have a case against McDonald’s, a case against the FBI, we just changed the state laws in New York City ... so, yeah, we have so many accomplishments to applaud and it’s due to the work of so many women and all of the survivors who were brave enough to come forward.”

Women face a lot of unconscious bias in Hollywood, she says. “There are so many talented females, but when looking [to fill] positions, studios will give you Tom, Dick and Harry. You ask: ‘Are there any women?’, and they go: ‘Oh, yeah, we do have some women.’ It’s a second thought. They’re not the first names they serve up.”

She hopes to make a difference as a producer and director. “I always start filling up slots with women and people of colour first, then if anything’s left, we will look elsewhere,” she says. “So instead of unconsciously ignoring women or people of colour, I’m consciously hiring them.”

She says she pitched and pitched for the job directing Flamin’ Hot, “and after the fifth callback they were going to make their decision and my agent says: ‘What are you most nervous about?’ I said: ‘That I’m going to get it, and then I’m going to have to do everything I promised, because I promised a lot of things in that room.”

Eva Longoria will be hosting her annual Eva Longoria Foundation dinner gala honouring American Ferrera and Howard G. Buffett at The Four Seasons Beverly Hills dinner gala on 15 November.