A Mary-Sue is an over-idealised fictional character that exists as an extension of the writer’s wish-fulfilment and ego drives. Despite all the talents and powers of the rest of the cast, Mary-Sue still somehow manages to be the crucial lynchpin in every situation, solving all the problems, directing the action, and totally overshadowing every other character. Ultra-competence on a character’s part is a symptom of possible Mary-Sue contamination, but it is not a definitive mark. S/he has no real flaws, is adored by all characters, frequently makes flagrant use of deus ex machina, and may share physical traits, tastes or names with the author. Generally, the presence of Mary-Sue will pretty much destroy the story.
A Mary-Sue character is usually the mark of a naive or inexperienced writer. The term originates from fan-fiction, in which enthusiasts write amateur stories based in the worlds they love. There’s plenty of great fan-fiction of course, but many Mary-Sue characters literally are the author as she dreams of being, dropped into the pre-existing cast of a story setting. The name comes from Paula Smith’s cutting 1973 parody of bad Star-Trek fan fiction, “A Trekkie’s Tale”.

Oh, Mary-Sue, we've been looking all over for you.
Note that despite the origins, some professional original fiction characters have been criticised as being Mary-Sues. The most notable in fantasy are widely held to be Laurell K. Hamilton’s Anita Blake of the “Anita Blake: Vampire Hunter” series, particularly as she appears in later books, and Eragon, from Christopher Paolini’s “Inheritance” trilogy. Outside the genre, Wesley Crusher from “Star Trek: The Next Generation” (Wesley was even creator Gene Roddenberry’s last name) and Dagny Taggart from Ayn Rand’s “Atlas Shrugged” are often considered two of the most egregious examples.

As much as I enjoyed The Dark Is Rising (and recommend it and have bought for my nieces), the Mary-Sue-ish nature of both Will and Barney was something of a distraction.
In the same category/genre of Mr. Crusher, there’s also Noah Hathaway’s Boxey from the first iteration of Battlestar Galactica.
The Dark is Rising has several major narrative flaws, I agree. The story is essentially passive; Will, in particular, feels like he’s on train tracks. Partly this is due to the hugely mythic atmosphere that Cooper conjures — something has to give to allow it, and that something is plot — and partly it’s due to the nature of the battle between the Light and the Dark being rooted in time. Unusually for an author dealing with chronological journeying, Cooper takes the stance that time itself is a tapestry, already woven. The characters seem on tracks because they are. To stay true to the concept and purpose, the characters have to be tied down. Almost no writer dares try it, and whether it succeeds here or not is down to taste, but it’s a brave thing to try.
But Will and Barney aren’t Mary-Sue characters. Will, in particular, fucks up a lot, particularly in emotional interaction. He has to keep brain-wiping his family, he alienates Bran, he misunderstands Jane… He’s highly comptent, and dragged around by the nose, but neither of those things necessarily make a Mary-Sue. Also he tends not to muscle in and solve problems that should rightly be the province of other characters.
Barney is certainly cuter and more generally popular, but again, he doesn’t really have Mary-Sue chops. Again, he’s not at the heart of all the action, solving all the problems by out-experting the experts. That is probably the most telling sign that Mary-Sue is in the room.