This is a multicenter, randomized, double-blind, incomplete block, three period fixed sequence crossover, multicenter, placebo-controlled study. The study will assess three oral doses of velusetrag (5 mg, 15 mg, and/or 30 mg) or placebo, administered once daily in three periods of 1-week duration each, with a 1-week washout period between treatment periods, in subjects with diabetic or idiopathic gastroparesis.