Web services play a crucial role in e-commerce by enabling seamless integration between various online platforms, payment gateways, and back-end systems. They allow businesses to provide a unified shopping experience by coordinating inventory management, order processing, and customer relationship management systems in real-time.