For years, Nike Inc. was one of the biggest holdouts against Amazon.com Inc., refusing to provide its sneakers and athletic clothing for sale on the hulking e-commerce site. Its products were so cool, the company reasoned, it didn’t need or want the help.

Recently, Nike reversed course. Behind that decision lies a dramatic shift in the balance of power between brands and Amazon.

For...