Specialty coffee is part of the movement to better understand and cultivate a relationship with coffee. In the past, coffee has been (and still is) sometimes considered a commodity. This would cause the price of coffee to be dependent on supply and demand, rather than a premium for a higher quality product. Over time, a greater emphasis has been placed on creating higher quality coffee to appreciate the flavors of coffee, but also the work and effort that goes into getting that coffee into the hands of us - the consumer.
One specific examples of this movement to specialty coffee are direct relationships between roasters and farmers.
Many specialty coffee roasters have begun to develop long lasting relationships with farmers to purchase better coffee, improve the farming practices, and help coffee farmers achieve a higher price for their crops. It's often associated with third wave coffee.