You already have two answers. One says yes, and the other says
no. Both give you arguments to support their view. Maybe the problem
is with the question.
Your question is, regarding English grammar:
Is it possible to verify if sentence is grammatically correct
I believe it might be possible, provided you give a definition of what
is a grammatically correct sentence in English, i.e. you give an
accurate English grammar.
You may notice that I am turning your words around, in a somewhat
tautological way. My intent is to question your question.
You can wonder whether something belongs to a set only if you are
first careful to define what that set is. Here, your set is defined by
"English grammar", which is a bit short.
Is there one prototype "English grammar" in platinum and iridium
alloy, as there is (or was) for the meter, to serve as reference to
decide whether a sentence is English or not? (BTW, what is a sentence?
... but I will skip that).
The answer is obviously no. But my intent is to tell you that the
first problem is not with the science or technology for checking
whether a sentence is grammatically correct, but with defining what is
a grammatically correct sentence, if it is definable at all.
They assuming that you manage to agree on some definition, with a
group of at least two people, you need some formal way of defining a
grammatically correct sentence, so that grammaticality is well
defined. Many formalizations of natural language have been
proposed. One major difficulty is that the subtlety of the language,
and the great variety of permissible constructions is such that the
formalizations used can reach very high levels of complexity, such as
is permitted by Chomsky type 0 grammars.
Unfortunately, at that level of sophistication of linguistic
description, you may hit limitations of what mathematics, or any
technology or device can do for you. You are in the realm of
recursively enumerable formalisms. That may mean that you may have a
definition that will allow you to recognize grammatical sentences, but
it will be impossible tho ascertain that a sentence is not grammatical.
The conclusion is that defining a procedure to check grammaticality
will hit two kinds of limitations:
linguistic limitations as grammaticality is an ill-defined concept
because a language has necessarily a fuzzy characterization;
mathematical limitations because the mathematical procedures
required by the more sophisticated definitions of language have
intrinsic fundamental limitations that cannot be overcome.
Now, if you are willing to settle for something that works reasonably
well most of the time, the answer is yes, it can be done, as suggested
by other answers.