To retch is to gag, or nearly vomit. The smell of a passing garbage truck on a hot summer day might make you retch.
Sometimes, retch is used to literally mean "throw up," but it usually means to come very close to throwing up without actually vomiting. You might retch because you're sick, or when you have to eat something you hate, like overcooked cauliflower. Retch is also a noun: "When I heard the retch from the bathroom, I knew he'd caught that stomach bug." Originally, to retch meant "to clear the throat."