1. An apparatus for controlling gastrointestinal motility, comprising: one or more sets of electrodes adapted to be circumferentially arranged about a patient's gastrointestinal tract; and a controller adapted to deliver electrical stimulation to the one or more sets of electrodes to induce a local circumferential contraction to at least partially block normal gastrointestinal motility of at a least a portion of the patient's gastrointestinal tract to delay gastric emptying.