Decide on the most important rules of grammar for providing clarity in writing, and emphasize those. Avoid spending too much time on rules whose violation has only minor effects on comprehensibility. For example, subject-verb agreement, verb tense and correct placement of modifiers are essential for clear writing; other rules, such as using a possessive pronoun before a gerund, rarely cause confusion when broken.
Find out which rules your students are breaking most often, and focus on those, perhaps allotting a short amount of time each class to talk about one or two of them. Have the students apply those rules to their own writing immediately after the lesson.
Give examples of misuse that illustrate clearly the need for the grammatical rules you teach. Since poor grammar often creates sentences with apparently absurd or surreal meanings, these examples can provide opportunities to make the subject funny and engaging. The more engaged students are, the more receptive they will be to the subject matter.
Find a professional short piece of writing and revise it so that it reflects gross grammatical errors. Have the students try to rewrite it into what they see to be its intended meaning. Then show them the original writing and have them compare it both to your version and their revisions of it.
Avoid correcting the students' grammar for them when grading; simply call attention to the rules they violate, and leave it to them to take responsibility for correcting their own mistakes. Allow them to revise and submit another draft for a higher grade as impetus to learn the rules and correct their errors.
Be clear about your expectations. Make sure students know that poor grammar reflects in their grades and that you call attention to it in your written comments on their papers.
Take examples of improper grammar from student papers and present them anonymously to the class. Balance this with positive examples also taken from student papers, so that students feel that their writing, whether well constructed or error-ridden, possesses enough significance to be put on display.
Recommend basic writing and grammar courses for students whose grammar is problematic and whose progress seems arrested. Referring them in this way will indicate the seriousness of the issue and give them a resource intensive enough for their needs.