loose exhaust header bolt
I had a loud clicking/ticking that would "rev up" when I hit the gas, but only in gear and not in neutral or park.
What had happened was one of the bolts that attach the passenger side header pipe to the engine had worked itself loose, so I basically had an exhaust leak. There was no (or very little) noise when not in gear because the cylinders were getting no backpressure. I don't know if I explained that properly, but all the dealership did (or so they said) was tighten the bolt, and it's been quiet ever since.
Hope this helps.
Good luck!
Brian