It should theoretically be possible. However, it would be easier and probably cheaper just to replace the engine with one designed for gasoline.
No, you cannot convert a gasoline engine to a diesel engine.
Simple answer: 100 pounds of Propane => 100 / 4.24 = 23.6 gal the "standard" LP cylinder for a gas grill is 20 pounds = 4.7 gallons The conversion for LP is Gallons x 4.24 = Pounds if one is trying to compare LP to gasoline, one must also consider that LP provides about 80% of the energy of gasoline. In a small portable generator, it is nearly transparent, but if one wishes to convert a car to LP one gets less mpg and hp.
A gasoline engine converts chemical energy into mechanical energy.
A engine exchange will be necessary. Remove the diesel and install a gasoline type.
The purpose of a gasoline car engine is to convert gasoline into motion so that your car can move. Currently the easiest way to create motion from gasoline is to burn the gasoline inside an engine. Therefore, a car engine is an internal combustion engine -- combustion takes place internally. The engine turns the explosion that takes place into Horsepower & Torque. Torque gets the car moving and Horspower keeps it moving.
The "...convert a gas car to electric..." implies removal of the gasoline engine and replacing it with an electric motor, creating an all electric car. If on the other hand you intend to keep the gasoline engine and use it when the batteries are low, then you will have created a hybrid gasoline-electric vehicle. With that qualification, and the assumption that you meant a full conversion from gasoline to electric, then the answer to your question is that IF the gasoline engine is removed from service, then the computer "that controlled the gas engine and its components" is no longer necessary and can be removed also. Also, the portion of your question relating to the gasoline engine computer suggests your thinking that it could be reprogrammed somehow to control the electric motor. Since that computer is designed for and is dedicated to the gasoline engine, it cannot be be reprogrammed and used to control the electric motor(s).
a gasoline engine is an Internal combustion engine
No, a diesel engine will not burn LPG. It would destroy a diesel engine. A gasoline engine can, with some modifications, burn LPG.
the engine is running
The gasoline engine came first. The gasoline engine was invented and patented in 1823 with the first efficient gasoline engine developed in 1876. The diesel was invented in 1893 which was 70 years after the gasoline engine.
If you're asking what will happen if you put gasoline in a diesel engine, the engine will be destroyed if you run it on gasoline.
and internal combustion engine and a gasoline engine are the same thing.