Google’s effort to keep its search engine relevant in a world of mobile apps just got a boost from a big rival.

Facebook Inc., operator of the world’s largest social network, on Friday began allowing Google to crawl and index its mobile app, a spokeswoman for Google parent Alphabet Inc. said.

The agreement means that results from Google searches...