 It has its origins in woodwork and carpentry. When wood is planed, sawed or sanded along the grain, it results in a smooth finish. But when it's done across the grain, it tends to splinter or be rough. So working against the grain is also far more difficult. And that's where the expression came from. It was first used by Shakespeare in 1607.