Looking on the World Wide Words website, it looks like it started as an insult for people who were being too smarmy and affectionate in public. In other words, too much PDA (PDA means Public Displays of Affection). Here is the article: http://www.worldwidewords.org/weirdwords/ww-lol1.htm
Please do not lolly gag in the hallway.
Although he made a good gag, nobody even smiled.
come gag
gag
The term gag factor refers to the gag reflexes. For example, a baby has very sensitive gag reflexes so even small amounts of food may cause the baby to gag.
Please do not lolly gag in the hallway.
The term "lollygag" is believed to have originated in the mid-19th century in the United States. It is thought to be a combination of "lolly," which may derive from "loll," meaning to lounge or move lazily, and "gag," which could refer to a playful or foolish act. The word originally described wasting time or being idle, often in a lighthearted or carefree manner. Its playful connotation has persisted in contemporary usage.
gag
gag
Although he made a good gag, nobody even smiled.
come gag
gag
The DVD did not have enough space to hold the gag reel.
Soap
Gag
There is a list of gag gifts on word press - the link to which can be found in related links.
You can use words like Gag,Gibe,Jest or Wag...