A gimbaled thrust system was used on the Space Shuttle, which is easily recognized in the beginning of this launch video. Was this technology first used by jet fighters, or was it first invented for rocket engines? What were the early successes and failures?
Early Rocket Use
Starting from the nasaspaceflight thread mentioned in comments:
The first gimbaled rocket engines were flown on MX-774 on July 14, 1948. It had four combustion chambers that could each swivel on one axis: There were three failed test flights where thrust cut off early, the first two don't give a reason but the third blames vibration for closing a valve early.
The second instance of a gimbaled engine (this time a single engine gimbaled on two axes) was Viking, first flown on May 3, 1949:
Viking pioneered important innovations over the V-2. One of the most significant for rocketry was the use of a gimbaled thrust chamber which could be swiveled from side to side on two axes for pitch and yaw control, dispensing with the inefficient and somewhat fragile graphite vanes in the engine exhaust used by the V-2.
The flight history references a number of successful and failing flight tests, but none blamed specifically on the gimbaling of the engine.
Was this technology first used by jet fighters, or was it first invented for rocket engines?
Actually, if you're just looking for instances of angling the engine for control purposes Wikipedia says:
Thrust vectoring is also used as a control mechanism for airships. An early application was the British Army airship Delta, which first flew in 1912.
and references modern non-rigid airships use of vectorable ducted fans as being similar.
Looking at jet engines I'm not finding anywhere that gimballing the engine is used: they just use vectoring nozzles to redirect the airflow. If that's accepted as gimballing then the graphite vanes of the V-2 would arguably be applicable. Also, the first reference I found to a jet using thrust vectoring (referenced from here) is this concept diagram from 1949, though the first flight appears to be October 21, 1960 on the P.1127 prototype for the Harrier, meaning rockets got there well before jets.
What were the early successes and failures?
I linked to the descriptions of the early test flights for the rockets above. The rockets had their share of engine problems, but there were no mentions of the engine gimbal failing in flight. I don't have any data on ground testing, which I would expect is where they would have proven it to be capable of withstanding the force of the rocket thrust.