In S1E18, Richard’s mother Lorelai is talking to Rory’s mother Lorelai (so confusing) about how she borrowed money to pay for Rory’s school. Lorelai the elder says, “You know Shakespeare once wrote, ‘Neither a borrower nor a lender be.'”
“Neither a borrower nor a lender be” is a quote from Hamlet, Act 1, Scene 3. It is advice given by Polonius (King Claudius’ advisor) to his son Laertes before Laertes departs for Paris. Read here for a good summary of the whole play.