You can calculate the distance to a vertex and then use a radius to choose if it's close enough or not.
Edit. If it's just an uniform grid, shouldn't it be quite easy to just grab the closest vertex on the grid depending on where you hit? Just divide the hit coordinates with the size of a tile on the grid and you should get the x and y for the vertex position. And with those you should get the actual vertex nicely from the array, vertices[y*w+x].