EXHIBIT 23.1 CONSENT OF ERNST & YOUNG LLP, INDEPENDENT AUDITORS We consent to incorporation by reference in the Registration Statements on Form S-8 (No. 333-65072, No. 333-42274, No. 333-39509, No. 333-06861, No. 33-64713, No. 33-60182, No. 33-38443, and No. 33-8980) and on Form S-3 (No. 333-76174, No. 333-57784, No. 333-49062, No. 333-47060, No. 333-31474, No. 333-12593, and No. 333-2451) of OSI Pharmaceuticals, Inc. and in the related Prospectuses, as applicable,of our report dated February 1, 2002, with respect to the financial statements of the Oncology Related Assets, Liabilities and Activities of Gilead Sciences, Inc. included in this Current Report on Form 8-K/A of OSI Pharmaceuticals, Inc. /s/ ERNST & YOUNG LLP Palo Alto, California March 6, 2002