Many airlines have contracts with medical consulting firms. These firms have on staff doctors that can offer advice and other assistance (such as coordinating ground responses) to flight crews. In addition, by participating in these services, many of the consulting firms will provide liability coverage in the event that the passenger doesn't make it.
As far as emergency equipment goes, all airliners now carry Automatic External Defibulators, as well as basic first aid kits and emergency medical kits which contain some controlled drugs that can be used by EMTs, doctors or nurses (or other qualified passengers).