I would not say that it is an attack on gay people, but it certainly plays on stereotypes about gay people and it plays on homophobic attitudes in society.
What makes this ad "funny" (if you think it is) is the idea that it would be mortifying and humiliating for it to even appear that a straight man was sexually interested in gay men. That is why the man with the hedge clippers is so taken aback when he notices the two men who are near to the Doritos. This plays on the idea that gay men are in some way repulsive and threatening to the masculinity of straight men.
So, this is not a direct attack, but it does use stereotypes and attitudes that are hurtful to many gay people.