Not only have their been many cases of actors who were almost in Trek, but many actors who became associated with well-known main cast or recurring roles were originally supposed to be different characters. Off the top of my head.
DeForest Kelley - Roddenberry wanted him to play the doctor in both of the pilot episodes. If he got his wish I suspect the "McCoy" character would have been subtly different (different name, different background, etc).
Rosalind Chao - Auditioned for Yar - eventually got Keiko as a consolation prize.
Jeffery Combs - Auditioned for Riker. Frakes remembered him, which is how he eventually got onto Trek as a recurring actor.
Denise Crosby - Was originally supposed to be Troi.
Tim Russ - Originally in the running for Geordi on TNG.
Marina Sirtis - Was originally supposed to be Yar.
Patrick Stewart - Supposedly originally auditioned for Data.
Tony Todd - Auditioned for six small roles before getting cast as Worf's brother. Was in the running for SIsko on DS9.
Michelle Forbes - Famously turned down two roles offered to her - the one which became Kira on DS9, and the one which became Torres on Voyager.
Andrew Robinson - Originally auditioned for Odo. Even earlier than that, he auditioned for the role of Will Decker in TMP.
Bob Picardo - Originally auditioned for Nelix before being moved over to The Doctor.
DeForest Kelley - Roddenberry wanted him to play the doctor in both of the pilot episodes. If he got his wish I suspect the "McCoy" character would have been subtly different (different name, different background, etc).
Rosalind Chao - Auditioned for Yar - eventually got Keiko as a consolation prize.
Jeffery Combs - Auditioned for Riker. Frakes remembered him, which is how he eventually got onto Trek as a recurring actor.
Denise Crosby - Was originally supposed to be Troi.
Tim Russ - Originally in the running for Geordi on TNG.
Marina Sirtis - Was originally supposed to be Yar.
Patrick Stewart - Supposedly originally auditioned for Data.
Tony Todd - Auditioned for six small roles before getting cast as Worf's brother. Was in the running for SIsko on DS9.
Michelle Forbes - Famously turned down two roles offered to her - the one which became Kira on DS9, and the one which became Torres on Voyager.
Andrew Robinson - Originally auditioned for Odo. Even earlier than that, he auditioned for the role of Will Decker in TMP.
Bob Picardo - Originally auditioned for Nelix before being moved over to The Doctor.