People may have different answers to this because they have heard this line being uttered by different characters from varying anime series. They may have heard it from anime series that they love to watch. This phrase has started to become popular mainly because this is something that is uttered by people in Japan when they want to get someone’s attention without being too direct about it.
There are a lot of girls in Japan who are encouraged to use this phrase so that they can show their attraction to another person in a subtle manner.
There was not one anime which popularised the famous line or meme "Notice me, senpai". The popular phrase is actually something said in Japanese culture as a way of showing interest in someone without outwardly professing their attraction. This is the same situation that takes place in numerous anime, as you can imagine.
So instead of anime making that phrase popular, it is a popular Japanese phrase used in Japanese anime. Japanese girls are often encouraged to use this phrase and in general find ways of attracting attention without being so direct.