The search and content company must start investing in technology now, and in a big way, in order to catch up with the likes of Google, a company making wide inroads into everything from online advertising platforms to wearable technologies.
Yahoo's large stake in Chinese online shopping outlet, Alibaba, must surge in order for Yahoo to gain any sort of advantage, Cramer said, comparing Yahoo's competitors to the Allied Powers in World War II.
(Read more: Yahoo shares fall as Mayer fails to stem revenue decline)
"If she weren't up against Google and Facebook a lot of this would be a lot easier," Cramer said on "Squawk on the Street." "They are really formidable. They're like the United States and Britain in the West in 1943—don't mess with us. ... I don't want to relate politically to who they are, but I'm just saying she's up against two of the great arsenals of democracy."