Yes this is a very common form of sexism as many, many studies have shown. In fact, women's opinions/statements/input are often treated as less valuable in the world of work. When this happens, smart men listen to the women's suggestions that are ignored and then make the same suggestion five minutes later where it is greeted with enthusiasm and support and generally implemented with the man getting the credit. A woman who says, "Hey I suggested that first", will be often verbally dismissed as no one else actually heard what she said.
So first, you need to accept that this is the way of the world and there is no way to ever completely get rid of this behavior. Not that you can't fight it (and you often should). But, you will fight this battle hundreds of times in your career - every time you work with a new group of men.
Advice that just do your job well and eventually people will notice is ridiculous. You need to be pushy about getting credit for your work and letting people know when they are dismissing you. But as discussed below, you need to use judgement about the time and place and whether it is a good idea.
Women are generally socialized to not rock the boat and that cooperation is valued over competition. This makes you appear weak. Often women present themselves in a way that makes them sound unsure (women are also, in many cultures, taught to make statements with a rise at the end of the sentence that turns it into a question). That contributes to men not taking your words at face value because you contributed to making them think you are unsure.
So the first step is making sure you are not sabotaging your own words. Check yourself out in a video and see if you are sounding positive or unsure. If you sound unsure then work with the video until you have practiced not ending with a question or questioning note. Practice until it becomes second nature. This may take months of practice.
Now as far as the men who patronize you (As so many of the respondents to this question have), you need to learn to judge which ones to fight and which to just accept. If the person is a client or a very senior manager or someone you will not be dealing with frequently, the best bet is to accept that the person is a jerk and ignore it. In the case of the client, it is sometimes best to then find a smart man who will give you credit and have the most important things presented by him. You can usually arrange this in advance once you know a particular person is a problem.
Peers and your immediate supervisor are another matter. Talk to your immediate supervisor first about his issue of checking everything you say with someone else. Point out that he does not do that with other people (assuming he does not do this with the other developers). Do not call your immediate boss on this directly in public. If he asks further questions that you know and the man he asked does not, then you can say something along the lines of, "Sam didn't work on that module, but I did and it does..." If he asks for a confirmation of what you said, then you have fewer immediate options, but you might be able to get the other devs on your side to say that they have complete faith that what you do is correct. After the meeting, you can privately ask you boss why he asked "Sam" to confirm your input.
If people interrupt what you were saying and interject comments, you interrupt them in turn and say, "I was talking" and then go on to make whatever point you were making.
What you don't want to do is go to HR with this problem. You need to be seen to solve it for yourself. If people see you as a person who complains to get "Special" treatment (Yes I know that what you are asking for is the same treatment, but to the people (and some of them are women) who do this treating women the same as men is special treatment), then your reputation at that work place is pretty much unrecoverable.
Another thing to do is to look for female allies in the workplace when you search for jobs. It is much easier to get taken seriously if you are not the only competent woman at that workplace.