I'm a UK parent of a kid in your target age range who's politically minded and who I think would be interested in your book.
I've not heard of libraries having a problem with books or banning them. There may be the occasional book that gets banned for blatant racism or other bigotry, but that's very different to having a gun on the cover. Librarians tend to be anti-censorship and I can't see the local library banning a book just for that. If the information from your lecturers is correct (never heard that before so I have no idea if it is or not) it might get shelved with the adult fiction rather than teen fiction but that wouldn't put my kids off anyway because they will look on the adult shelves too. Kids that read avidly tend to read up an age range or two. (And lots of adults read teenage fiction.)
Is the advice you were given specific to the UK? Issues like censorship, age appropriateness, etc, vary a lot on either side of the Atlantic. YA is an American age category. Libraries and bookshops over here classify it as Teen, in my experience.
For films, if it's glorifying gun violence it would get an 18 rating rather than a 15 rating, however American History X has a 15 rating so graphic gun violence in a context that shows how senseless it is won't get a film an 18 rating. Seeing as people are a lot more sensitive about these types of content in films than they are with books, and books don't even have age ratings (only marketing categories based on who the target audience is), I can't see any book with similar themes or levels of violence to a 15 film being considered as inappropriate for teenage readers.
ETA: I can think of quite a few 15 rated films with gun violence - The Godfather, for example. Just that American History X sprang to mind because of the theme of racist violence and one of the main characters being a teenager.