Usually not.
It depends on various factors, most importantly the available fuel.
If the pilot decides that enough fuel is available even after accounting for the extra drag due to extended landing gear, he can decide to continue, though this will rarely be the case as the drag penalty is too high and the aircraft speed is limited.
A case in point is the Hapag-Lloyd Flight 3378 , which crash landed due to fuel starvation caused by the extended landing gear (which was kept that way as a precaution).
The pilot was criticized for his decision to keep on flying instead of diverting to another airfield, and given a suspended prison sentence .
aviation.stackexchange.com/users/9731/aeroalias
Unless it's a (very) short hop with sufficient fuel onboard and anticipated maintenance services at the destination airport, no.
As mentioned above extended gear restricts speed and increases parasite drag on the airframe.
The most likely scenario would be to report this to ATC, thence divert to a hold to either dump or burn off your excess gas until you're below the maximum landing weight, thence return to the departure airport or divert to an alternate.
aviation.stackexchange.com/users/15637/Carlo Felicione
A flight can continue, there's no regulations to prevent it
, it's the judgement of the pilot in command.
In most cases the drag penalty will mean the flight will run out of fuel short of its destination, but a flight could theoretically continue.
If the airplane has a short hop, plenty of fuel and the emergency facilities at the destination are better than the originating airport then continuing to the destination may be the best choice.
That would be very rare though, usually a flight would divert to a much closer airport or return to the field it took off from depending on the emergency facilities available.
aviation.stackexchange.com/users/1791/GdD
Another factor would be the facilities available at the origin/dest/enroute airports.
For landing gear issues a gear-swing may be required and that would require aircraft jacks/stands.
Example, I worked in an airline which operated a short sector from KUL-CGK vv.
On departure KUL the landing gear would not retract.
The pilots discussed this with MCC (maintenance control) and decision was made to divert to SIN where there was full capability for any landing-gear work.
Basically, an aircraft with its gear down is still safe, it will not fly as fast nor as far as planned but it is not a 'land immediately' situation.
aviation.stackexchange.com/users/26171/Anilv
Gear down invokes two penalties: increased drag and reduced speed.
On modern airliners, gear down can add up to 50% more drag, so that's not an inconsequential number.
Also, the landing gear doors being open, or even partially open in the case of airliners that have some streamlining of gear in the down position, limits the maximum speed to a very low number, beyond which the doors will be torn off by the slipstream, possibly doing some nasty damage to the aircraft in the process.
That also limits the pilot's options in an emergency situation, like needing to descend quickly, or accelerate to avoid a dangerous condition, like stalling.
Finally, one has to ask... if the gear fails to retract, what else is wrong?
Maybe nothing, maybe something.
Could be a bad switch, could be a hydraulic leak that might also affect the flight controls, could be a piece of metal digging into the wiring harness that might later affect critical systems or start a fire.
For sure, the aircraft has a problem that's out of the ordinary.
In the end, it's up to the pilot to make the call, but a failure of the gear to retract on a commercial airliner usually means getting the plane landed as soon as practical...
i.e. dumping enough fuel to get down to a safe landing weight and getting clearance.
It's a lot easier to change planes or find and fix the problem, than to lose the aircraft and its passengers.
aviation.stackexchange.com/users/22436/tj1000
This happened to me while working as a flight attendant some years ago.
On a late night flight from Columbus to Cincinnati the pilots left the gear down because they saw a cockpit indication after take off that left them concerned that if they retracted the gear, they might not be able to get them back down and locked safely.
The flight was low and slow, but otherwise unremarkable.
We had a maintenance facility in Cincinnati
so they wanted the plane on the ground there as opposed to returning to Columbus where there was no maintenance support.
If an airplane can land and take off with the gear extended, it's certainly air worthy for a short flight with gear extended.
Low and slow would be a given, but otherwise there shouldn't be any problem.
aviation.stackexchange.com/users/9161/PJNoes
If the gears failed to retract after take off, an aircraft could carry on with its flight, but with limitations to its airspeed, cruising altitude and ATC (Air Traffic Control) would need to be informed of decreased cruising speeds and altitudes.
The flight time may also be affected as increased drag from the landing gear will mean the amount of fuel may not be enough to reach the flight destination.
But due the fact that most airline routes are quite far, most wouldn't be able to be completed if the gears refused to retract.
aviation.stackexchange.com/users/16812/anonymous
It depends on circumstances if pilot have sufficient fuel, to counter increased parasite drag due to landing gear, for endurance and flight is important (due to any prospect like reputation of airlines or emergency flights etc.)
than they continues their flight.
In such cases pilot must have to inform ATC for their low cruise speed and altitude.
But generally airlines do not prefer to fly with extended landing gears and used to divert to nearby airstrip.
because this also restrict the airspeed and it causes delay in schedule, but there is no regulation on this.
aviation.stackexchange.com/users/17914/santosh
Although not a general FAA regulations, some aircraft type certifications restrict their max airspeed with gear down.
That will also restrict their service ceiling, probably so much that the original flight plan can't be flown.
aviation.stackexchange.com/users/29781/Bob Jacobsen
So after take-off, due to any reason, the landing gear does not re-tract, is there any standard procedure to be followed? Or can the airline continue with its flight?  Also, I would like to know any FAA regulation on the same (if any), which deals as to the procedure to be followed in such situations.
Can a commercial airline continue its flight if its landing gear fails to retract after take-off?
aviation.stackexchange.com
<faa-regulations><takeoff><landing-gear>
aviation.stackexchange.com/questions/32947
aviation.stackexchange.com/users/1678/Firee
Planes do not usually continue their flight if the landing gear fails to retract. There are several reasons for this. Firstly, the landing gear increases drag and hence fuel consumption. Second, there may not be maintenance services at the destination. Theoretically, it is possible to continue but in practice it rarely happens, unless the flight is just a short hop. It depends on many things, mainly the available fuel after taking into consideration the additional drag and the facilities at the airport they are headed to. If the aircraft can land and take off under these circumstances, it should be able to complete the flight, albeit flying lower and more slowly. As far as regulations are concerned, there are certain limitations in cruising speed and altitude and ATC should be informed. However, airlines usually do not prefer to fly under these circumstances and will land as soon as possible. 
Usually not, airlines do not prefer to fly under these circumstances and will land as soon as possible.  It depends on many things, mainly the available fuel after taking into consideration the additional drag and the facilities at the airport they are headed to. If the aircraft can land and take off under these circumstances, it should be able to complete the flight, albeit flying lower and more slowly. As far as regulations are concerned, there are certain limitations in cruising speed and altitude and ATC should be informed.