If yours was a handshake deal, you may have to fend off the lien in court. Even if you win, that could cost thousands in legal fees, so it might be worth negotiating with the sub instead.
How to keep this from happening to you: Have your lawyer review the contract up front, and don't make any payments to the GC until receiving lien waivers from all the subs. Or, for a couple of hundred bucks, a title company will hold the money in escrow and disburse it to the GC or the subcontractors.