Baidu Inc. recently crowed about besting rivals, such as Google Inc. and Microsoft Corp., in a closely watched standard test of artificial intelligence. On Tuesday, the Chinese technology giant apologized for misleading the public about its accomplishment.

Baidu’s gaffe is a sign of the increasingly high stakes as the world’s top tech companies race to develop technologies that allow computers to recognize photographs, control robots, understand spoken language and perform other tasks that until recently required human attention....