Official rules sources
A grapple check is like a melee attack roll.
(Player’s Handbook, pg. 156)
A grapple check is like a melee attack roll, but it’s modified by your grapple modifier.
(Rules Compendium, pg. 60)
That’s all we’ve got. Properly speaking, you have to ask your DM exactly how much “like” an attack roll a grapple check is.
Wizards’ rule explanations and answers
Wizards of the Coast published an FAQ and a series of “Rules of the Game” articles that are supposed to explain the rules. Unfortunately, neither is very reliable—both have numerous cases where they are distinctly incorrect about the rules—and that makes them problematic to use for much of anything. See What is wrong with the D&D 3.5 FAQ? for more details.
So these should be seen as maybe-possibly sources of evidence to suggest one ruling or another to a DM, but cannot really be relied upon.
Rules of the Game
Often provides more useful explanation and examples that might indicate intent. Does not here; it just repeats the same things other sources have said. Worded slightly differently in a way that maybe suggests that the change to the size modifier is the only difference, and otherwise the grapple check works just like an attack roll?
A grapple check is just like a melee attack roll, except that a special size modifier replaces your normal size modifier.
(Rules of the Game: All About Grappling, Part 1)
FAQ
The FAQ comes down explicitly on the side of “a grapple check is not an attack roll,” repeatedly; for example:
When using Combat Expertise or Power Attack, does
the penalty you take also apply to opposed attack rolls
(such as when you are involved in a disarm or sunder
attempt)? What about on grapple checks?
Yes and no. Anything described as an attack roll (even an
opposed attack roll) can be affected by Combat Expertise or
Power Attack. A grapple check isn’t an attack roll, so you can’t
use Combat Expertise or Power Attack in conjunction with it.
(v.3.5 Main D&D FAQ—note, .zip file download with .pdf inside)
The problem with this is that it does not justify this claim in any way: it just states that it is so, despite the ambiguity of the actual rules. Frankly, considering the Rules of the Game description, I was rather leaning the other way on it.
And this particular example is especially problematic, because you don’t use Combat Expertise or Power Attack “in conjunction with” an attack roll—you use Combat Expertise when you use an attack or full-attack action (which you definitely do to grapple, at least in almost-all cases), and you use Power Attack “before making attack rolls for the round.” Both effects last for the rest of the round (that is, until the start of your next turn). So you can definitely use them, and they are definitely in effect, when you’re grappling. The FAQ kind of implies you can’t use them at all, and that’s definitely wrong.
And if you do use them, under this ruling, the attack penalty does not apply to the grapple check—but the bonus to AC or to melee damage rolls would apply. The FAQ seems to be suggesting they would not, but there is absolutely no ambiguity in the rules about that, unless (in the case of Power Attack) you want to suggest grapple damage isn’t “melee damage.” Even if you do, Combat Expertise doesn’t even have that much ambiguity about it: you definitely get the AC bonus. So this ruling is either wrong (or, actually, it’s definitely wrong, but more wrong), or lets you get full Combat Expertise AC or Power Attack damage for free. That does not exactly inspire confidence.
In practice
Personally, I have always ruled that pretty much everything that applies to attack rolls applies to grapple checks, with the obvious exception of the usual size modifier. I don’t really feel like there is a really good answer to the questions about Combat Expertise or Power Attack or similar otherwise.