What is the maximum resistance that is allowed when connecting two grounds in a 5V unit?
It depends on how much current has to flow through the ground wire, its resistance, and the acceptable voltage drop. 

To minimize ground voltage differences the higher current parts of the circuit should be positioned closer to the power supply. Taking the example of an Arduino controlling a motor, the circuit could look something like this:-







simulate this circuit &ndash; Schematic created using CircuitLab

At stall the motor draws 3 A, dropping 3 V across the ground wire resistance (R1) from the motor driver to the power supply. This reduces the driver and Arduino supply voltages by 3 V, but they should still work with the 9 V that is left. Despite the relatively high resistance of the negative power supply lead, motor current has no effect on 'ground' voltage between the Arduino and motor driver. 

The Arduino draws ~50 mA. The high resistance of the ground lead (R2) between it and the motor driver causes a voltage drop of +0.5 V between them. This causes the PWM output to go from +0.5 V to 5.5 V instead of 0 V to 5 V at the driver input. 

Will this voltage difference be a problem? Provided the motor driver sees +0.5 V as a low logic level and doesn't mind a +5.5 V high level it should be OK. A common IC used in motor driver boards is the L298. This sees logic low below 1.5 V and can withstand a maximum of 7 V, so it should work. However the noise immunity is now only 1.5 - 0.5 = 1 V instead of 1.5 V, making it more sensitive to external interference.   

Now consider what would happen if R2 was increased to 30 &ohm;. It now drops 30 * 0.05 = 1.5V. With the Arduino ground raised 1.5V above the motor driver ground the driver may no longer see the logic low, causing the motor to randomly turn on and off depending on the exact current draw and any other noise in the circuit.  

In the case of an Arduino powering an LCD panel you have the opposite effect. Any resistance in the ground lead between them will cause the signal voltage to go lower at the LCD panel. If it goes below -0.5V the IC in the panel may misbehave or even be damaged by the negative voltage. With 20 mA draw the resistance required to cause this is 0.5 / 0.02 = 25 &ohm;.         

In both of these examples a ground resistance of 100 &ohm; would not be acceptable. 

If the Arduino and the other device are separately powered then the resistance of the ground wire between them only has to be low enough to handle the signal current, which is usually only a few milliamps. At 5 mA a ground resistance of 100&ohm; would be acceptable. However if both power supplies are grounded through the mains or some other common equipment then you could get a ground loop due to voltage induced into the mains wiring etc., which your high resistance ground wire will not be able to prevent.