If centrifugal forces are fictitious, then isn't gravitational force also fictitious? When the earth revolves around the sun, the sun attracts the earth by a gravitational force $F_{se}$ (centripetal force), and the earth attracts the sun by a gravitational force $F_{es}$ (centrifugal force). The two forces are equal and opposite according to Newton's third law.
We know that a centrifugal force is a fictitious force. So, $F_{es}$ is also a fictitious force, but wait, how is this possible? Gravitational force is not fictitious! But if a gravitational force is a centrifugal force, it has to be fictitious, right (since all centrifugal forces are fictitious)? So, is gravitational force fictitious or not?
 A: In addition to the centripetal/centrifugal force pointed out by Steeven, there is also the fact that gravitational force is still applicable even if there is no circular motion - so e.g. the Sun is attracting Alpha Centauri, even though Alpha Centauri does not orbit the Sun.
A: Other answers have handled the confusion you had about the forces acting on the Sun and on the Earth. This answer is about the fictitiousness of gravity.
Centrifugal force is a fictional force that must be added when the reference frame is rotating. When a person is on a merry-go-round and they consider themselves to be stationary, a fictional centrifugal force must be added so that the actual force they are really feeling -- the bars of the merry-go-round pushing on them so that they move in a circle -- is balanced by a perceived force pushing them outward, resulting in no motion in the rotating non-inertial frame.
In Newtonian mechanics, gravity is a real (non-fictitious) force.  But in General Relativity, gravity is a fictitious force that must be added when the reference frame is non-inertial. Rather unintuitively, someone standing on the Earth (and not moving relative to the Earth) is in a non-inertial frame, because they are not in free fall. The Earth pushes upward on them at 9.8 m/s2, and the fictional force of gravity must be added, of equal magnitude but pointed downwards, so that the mechanics work out and they remain on the surface of the Earth.  In the matching inertial frame, they would fall freely downward unless the Earth was pushing on them -- not because "gravity" is "pulling" on them, but because the shape of space requires that objects with no force on them fall freely.
A: The concept of centripetal or centrifugal force depends on the reference frame you are in. So, it is not correct to say that the gravitational force is a centripetal force.
Suppose you are at rest in a laboratory and imagine two objects sitting on a desk: they are acted by gravitational forces but they remain at rest due to friction forces with the desk. In this case, there is no centripetal force on any object but both are acted on by gravitational forces.
The case of the earth revolving around the sun is a special case because according to Newton's second law the sum of all forces acting on a body is $ma$, so, assuming a circular orbit with the sun fixed at its center and neglecting any other forces except gravitational, $$F_{\text{grav on earth}}=m_{\text{earth}}\cdot a_{\text{earth}}.$$ But since the earth is moving in a circular orbit, $a_{\text{earth}}$ is given by the centripetal acceleration, so we usually identify $m_{\text{earth}}\cdot a_{\text{earth}}$ as a centripetal force. However, in general it is not the case that the gravitational force is equal to what we call a centripetal force.
Centrifugal forces are a bit different. When you are in a non-rotating frame such as in the cases described above there is no centrifugal force. Centrifugal forces only appear in non-inertial reference frames, such as the rest frame of the earth in the earth-sun system, i.e. the frame that rotates together with the earth. In such a frame, because the earth is permanently at rest, there is no acceleration. However, because it is a non-inertial frame we can have fictitious forces, and indeed in this case the gravitational force due to the sun will be balanced by a centrifugal force equal in magnitude to the centripetal force from before.
A: The best way to avoid this kind of confusion is to start from the beginning in a purely Newtonian description of the motion, i.e., working in an inertial frame. Only after understanding the situation in the inertial system it is possible to analyze it in a non-inertial frame without terminology or conceptual confusion. For the present discussion, we can neglect the effect of the presence of other planets.
In an inertial frame, both Sun and Earth move with an almost circular trajectory around the common center of mass. If centripetal means towards the center of rotation, both $F_{es}$ and $F_{se}$ are centripetal. In this inertial frame, no centrifugal force is present.
In the non-rotating non-inertial frame centered on the Sun, thus accelerating with acceleration ${\bf a}_s$ with respect to any inertial system,  a fictitious (or inertial)  force ${\bf F}_f = -m {\bf a}_s$ appears on each body of mass $m$. As a consequence, there is no net force on the Sun, and the force on the Earth is the sum of the usual gravitational force plus a fictitious force
$$
{\bf F}_f=-m_e {\bf a}_s
$$
where ${\bf a}_s=\frac{Gm_e}{r_{es}^2}{\bf \hat r}_{es}$ is the acceleration of Sun in an inertial frame, ${\bf \hat r}_{es}$ is the unit vector from Sun to Earth. Therefore, this fictitious force points toward the Sun and should be called centripetal in this reference frame. It has to be added to the gravitational force on the Earth, again a centripetal force.
The reference frames where a centrifugal fictitious force appears are all the non-inertial reference frames rotating with respect to the inertial frames. For example, if we assume circular orbits for simplicity, in the non-inertial frame centered on Sun and co-rotating with Earth, a fictitious centrifugal force on Earth appears, exactly equal to the gravitational force. Indeed, in such a rotating system, the Earth is at rest at a fixed distance from the Sun.
A: You are mixing together centrifugal with centripetal.
There is no such thing as a centrifugal force, correct. Rather the centrifugal effect is the tendency to appear to fly outwards in the circular motion that we feel. This fictitious force pushes outwards.
But there is a centripetal force. It pulls inwards. And this is what gravity does. The earth is pulled inwards towards the centre of its circular path. This is the force that actually causes the circular motion since this force is adding the inwards perpendicular speed component that causes the velocity vector to turn.
Gravity in the case of earth's orbital motion is indeed the force that constitutes the centripetal force.
A: The confusion is in your first sentence, where you identify a gravitational force as "being centrifugal" or "being centripetal". That's the basic error, which then sets you up for "but that's fictitious, isn't it..."
Let's fix that error quickly and simply.
Classically, the sun attracts the earth, and the earth attracts the sun, due to their mass, via gravity. (I'll ignore general relativity and warped spacetime and such, but be aware that's a more sophisticated and apparently correct way to see it).
But neither of those forces should be defined as being centrifugal or centripetal without a bit more thought.
The suns pull on the earth causes the earth to accelerate. The earths acceleration results in an elliptical (almost circular) orbit. That's a genuine force. If it was a physics question we would identify it as a centripetal force - a force pulling toward a fixed centre, or fixed point.
Similarly the earths pull on the sun, causes the sun to rotate round the earth.  That's also acting as a centripetal force.
Technically both rotate around a point called their baricentre, a sort of "centre of mass and gravity" for the 2 objects. Each is causing the other to rotate around it. However, as the sun is so much bigger, we only see one object rotating, but in reality both are circling.
But there isn't a centrifugal force in the system. Not really.
A: Although your reason is incorrect as others have pointed out, the gravitational force is indeed fictitious, locally.
Let's compare two situations:

*

*You stand on the earth and there is a gravitational force $F = m_gg$

*There is no gravity but everything around you is moving with an acceleration $-g$. In this case there will be a fictitious force $F = -ma = m_ig$
As long as the gravitational mass $m_g$ is equal to the inertial mass $m_i$, which has been testified by the experiments so far, then you cannot tell the difference between (1) and (2).
Note that this is only true locally because gravity has tidal effects. It basically means that the force on your head is different from the force on your feet. In an extreme case where you are being sucked into a black hole, you can feel that your body is being pulled apart, which will not happen for a fictitious force.
