Talk to your supervisor and course leaders, asap. They are there to support you. A Masters course can feel a bit lonely, as you have such a short time to get to know who's who, but there will be people whose job it is to make sure that you're on track. They may also be able to direct you to other avenues of support - for example, if you're struggling with writing, there may be workshops or sessions to help.
I'd be really cautious about assuming other people are doing better than you, or that their grades can tell you much about how you'll eventually do.
I got a 2:1 in my undergrad and spent the first bit of my MA worrying like crazy. And there were confident people who would breezily ask everyone else what marks they got, and I did feel I was doing badly. In fact I failed a component and had to re-sit.
But, in the end, some of the people who came in with firsts feeling all confident, didn't do so well, others who had 2:1s like me did brilliantly, and we all ended up on very different trajectories through the whole course (not to mention afterwards).
People do drop out of MA courses (I supervise courses, and I've seen some of the very different reasons why students do). But your university will want to do their best to help you stay on, if that's the right thing for you, so do make sure you access support before coming to a decision. Bear in mind, too, that it may be possible to intermit for a year and to come back.
You certainly won't be a failure, whatever decision you take.