WASHINGTON—The Justice Department’s plans to investigate Alphabet Inc.’s Google have been building over time, amid a growing public conversation about whether the government should do more to scrutinize the handful of giant tech firms that dominate the U.S. landscape.

The department’s antitrust division and the Federal Trade Commission, which share federal antitrust enforcement authority, have sent a variety of signals that they were eager to explore cutting-edge questions about how big tech is affecting the competitive landscape.

While the FTC in February announced a new task force to consider tech competition, the Justice Department has been planning its approach behind the scenes, while also holding public events to educate its staff and the public about the contours of the tech debate.

The department last July hosted a speech by Franklin Foer, author of “World Without Mind: The Existential Threat of Big Tech,” a book that raises alarm bells about Google and other tech giants that have built their dominance on the collection and use of big data.

“There’s so much hanging in the balance when we talk about their size and dominance. And therefore so much is resting in your hands,” Mr. Foer told the Justice Department audience.