Of course it would have had some effects! Gravity obeys the mathematical function:
$F = {G\ m_1\ m_2\over D^2 }$
where G is the constant of gravity (approx. $6.67430 \times 10^{-11} N m^2 kg^{-2}$), $m_1$ and $m_2$ are the masses of each body, and $D$ is the distance between each body (center-of-mass to center-of-mass).
Supposing the robot’s mass is about as much as the planet’s mass, it would definitely have thrown it off-course as it approached the planet—but, then again, the planet would also have affected the robot’s course.
It would not, however, have “affected the planet’s gravitational forces,” as the gravitational force exerted by a body depends only on its mass.
I would presume, though, that there are, on planet Cybertron (though we can’t see them on this image) bodies of water, or simply loose objects. These would have been affected by Unicron’s presence/approach, and would have been somewhat displaced by his presence/approach, as there was a force (basically) as strong as Cybertron’s gravity pulling them in the direction where Unicron was at that moment. Such objects on the opposite side of Cybertron may have been crushed (if they were not made very resistant), for example, and such objects on the side of Cybertron facing Unicron would have “lost their weight” (at least partly) and—no, not float—being easier to displace…
A lot is not know in the context of your question. Maybe reading the comix where this comes from would help know Unicron’s trajectory, etc., but I’ll leave that for others.
Be well!