FedEx Corp. agreed to buy Dutch package-delivery company TNT Express NV for $4.8 billion, making an end run around rival United Parcel Service Inc. and positioning itself to capitalize on the growth of e-commerce in Europe.

FedEx already has a sizable air-express delivery operation in Europe, but it lags behind in the ground-delivery business. Acquiring TNT would give it an established door-to-door road network in Europe that connects more than 40 countries, saving the U.S.-based company the time and money required to build...