Scientists have subjected Albert Einstein's famous theory of gravity to its toughest real-world test so far—and it has prevailed.

The theory, which was published nearly a century ago, had already passed every test it was subjected to. But scientists have been trying to pin down precisely at what point Einstein's theory breaks down, and where an alternative explanation would have to be devised.

Einstein's...