With appropriate treatment, a gastric ulcer may take up to 3 months to completely heal. Your doctor will discuss with you the most suitable treatment for you, which may include antibiotics and proton pump inhibitors, which are medicines often used for heartburn.