EJB is based on RMI-IIOP protocol whereas Web services is based on SOAP protocol over HTTP(or any other).
WebServices is used for intergrating hetergenous platforms. WebServices makes it possible to expose your API's to your business partners where the client application could be running in a different platform (.NET for exampel) than the server. You might have guessed that WebServices has a performance overhead compared to native implementations.
It is possible to expose EJB 2.1 as a Webservice endpoint.