Ever since Greg's YouTube channel gained popularity, people misread his username as "onion". Even today, fans suffer from auto-correcting his name to onion.
To spite Greg and his (at the time) known hatred for the mispronunciation of his username Onision, anti-Onision vloggers and later bloggers started calling him "Onion". For years it was associated by Greg and fans as a hater term.
By 2015, anti-Os switch up the "Onion" nick name and began calling Greg "Onion Boy". The term became so widespread, a popular YouTuber began to use it when they talked about Greg, most likely to not reveal his username and give him more publicity. (Source deleted)
ShrekSource) This eventually lead into odd photoshopped images of Greg combined with Shrek to spread on message boards and blogs.
In 2013, Greg started using the term Onion on social media. He began stating that "Smurfs call me "Onion" because i make them cry." on his Facebook. Greg continues to use variations of this phrase today. He also occasionally posts an Instagram image of himself next to bags of onions in reply to people calling him "Onion". (Source)