Mr McGowan will step down as premier and treasurer within days after deciding to call time on almost three decades in parliament, citing exhaustion.
Members of WA Labor's dominant left faction met on Tuesday to determine whether they could reach a consensus on a leadership candidate.
Deputy Premier Roger Cook declared he would run for the top job but it was Ms Sanderson who emerged from the meeting, saying she had been selected.
"I've been chosen with a clear majority to be the candidate to go forward for the leadership," she told reporters.
"I will now reach out to my colleagues across the caucus with a focus on unity and stability."
Ms Sanderson only became a cabinet minister in 2021, initially taking the environment and commerce portfolios before taking on health.
The leadership is now hers to lose unless Transport Minister Rita Saffioti challenges or Roger Cook moves to have the matter decided at a ballot of rank-and-file Labor members.
Ms Saffioti, who is not aligned to a faction, has confirmed she is also sounding out colleagues.
Mr Cook, who served as health minister during the peak of the COVID-19 pandemic and now holds the state development, jobs and trade portfolios, had talked up his credentials as a "key economic minister" earlier in the day.
"As his deputy and someone who's been acting premier on many occasions, I feel I know what is required to be premier," Mr Cook told Perth radio 6PR.
"I have the energy, I have the experience and I think I have the support of the wide majority of the Labor Party."
Mr Cook said he had been incredibly shocked by Mr McGowan's resignation, confirming he only learned of the premier's decision at a cabinet meeting on Monday shortly before it was announced.
If the party is unable to settle on a candidate, it will have to canvass rank-and-file members in a process that could take weeks.
"I think people would be keen to find a consensus candidate," Mr Cook said.
Mr McGowan said the role of political leadership was relentless and the COVID-19 years had exhausted him.
"I just don't have the energy or drive that is required to continue in the role as premier or to fight that election, which would have been my eighth election as a member of parliament," he said, referring to the next state poll in 2025.
Prime Minister Anthony Albanese was among those who paid tribute to Mr McGowan following his announcement.
"He has been a great premier of his proud state, an extraordinary leader for WA Labor and a trusted friend," he said.