A liquid delivery device comprising a housing having a lower surface for application to the skin of a subject and having a reservoir and a gas generation chamber therein separated by a displaceable membrane. Gas generated by an electrolytic cell under the control of a microprocessor causes the gas generation chamber to expand and the reservoir to contract, thereby discharging a liquid drug, such as insulin, from the reservoir via a hollow delivery needle extending from the lower surface. The delivery needle and a sensor needle both extend from the lower surface a sufficient distance so as to penetrate through the epidermis and into the dermis when the housing is pressed against the skin. The sensor needle has an enzymatic coating for the detection of an analyte, such as glucose in the subject's plasma. The delivery needle is made of platinum-iridium, and a current passes between the needles and a potentiostat circuit according to the amount of glucose detected. A reference electrode (silver/silver chloride) which rests against the subject's skin increases the accuracy of the glucose measurement. The current through the potentiostat circuit is measured by a voltmeter and a signal from the voltmeter is amplified and communicated to the microprocessor which determines the correct rate of delivery of the drug on the basis of the level of analyte detected in the subject's plasma.