The big question that both your recommenders and the admissions committee will wonder about is what this experience predicts for you in graduate school. If you do poorly when taking a grad class now, will you be able to do well in grad school?
One factor may be preparation. Maybe you were enthusiastic but overly ambitious, and in another year you'll have the experience and preparation needed to do well. This is the reassuring scenario.
Another possibility is that you're just not used to be challenged by courses, since the undergraduate program was not very demanding. Now that you know what you face, you'll take it more seriously and do better. It's entirely possible, but this scenario is more worrisome. Lots of people say "oh, next time I'll work harder," but this is easier said than done.
And there are even more worrisome possibilities. For example, maybe you just didn't like the material and couldn't bring yourself to engage deeply with it. This could be a symptom of lack of preparation, or it could be a sign that this field is not a good fit for you.
I'd recommend dropping the course. In grad school there's no value in barely passing a course: if you need to learn something, then you need to really learn it well, not just avoid failing. This means a bad grade on a transcript won't impress admissions committees, and it means you're going to have to go back and learn this material properly in the future anyway. Probably you should take this course in grad school. If you don't take it, then you'll need to put in some serious effort to master the material on your own.
Meanwhile, you should think about what went wrong and how to explain it to your recommenders, so that you reassure them regarding your future in grad school.