Fuel injection started replacing carburetors on cars in the 60's and 70's
The original fuel injection introduced in 1970 is called D-Jet. The "D' stands for the German word druck, which means pressure. This photo shows a d-jet electronic control unit with the top removed to show the internal circuit boards. By today's standards this is primitive piece of electronics, but back in the day it was state of the art.
from (www.vclassics.com/archive/efi.htm)
The ECU's job is to determine how much fuel is needed and then control how long the injectors are snapped on during each piston stroke (even at full throttle, the injectors are on only a small fraction of the time). The ECU will vary this period in accordance with the following inputs:

Throttle position and movement from the Throttle Switch, which is just outside the throttle body and is connected to the butterfly shaft.
Intake manifold pressure from the Pressure Sensor, which is the hand grenade-looking thing on the fender connected to the intake manifold by a rubber hose.
Coolant temperature from Temp Sensor #2, which is a small fitting screwed into the head on the right just below the thermostat housing.
Ambient air temperature from Temp Sensor #1, generally located in the air cleaner box.

An additional input is required so that the ECU will synchronize the fuel injectors with the piston strokes. It therefore receives signals from a set of dual Trigger Points in the base of the ignition distributor. Each of the two points controls two injectors (in our four-cylinder motors, anyway).