There's a museum of computer science at Stanford. And in a way, GitHub is a kind of gallery for code, isn't it.
A lot depends on the definition of art. If art is supposed to be intent + expression specifically meant to evoke an emotional response, then maybe not.
But if just intent + expression is enough, then it certainly is.
Otherwise, what's the point of a language and programs written in brainfuck?
A beautifully written piece of code is art to me, because it takes me into the mindspace of the person who conceived it, just as a beautiful piece of music takes you into the mindspace of the composer.
To me the most important part of art is intent and there's plenty enough of that in coding. So if you want it to be art, it is.