We are replacing all of the outlets and switches in our house. This one set of lights can be controlled by either a switch or a dimmer that is on another wall. The only problem is the switch has to be turned on for the dimmer to be able to turn the lights on or off. I replaced the switch with a new 3-way switch. I noticed that the old one was also a 3-way. Then I decided to replace the dimmer but there were only 2 wires connected to it. A red and a black. The same black was also connected to another switch in the same box but controls an outside light. I noticed the red wire came out of one cable and the black wire came out of another. I hooked these 2 up to the dimmer, putting the red on the contact with the different colored screw. The light would work with it this way but it still required me to have the switch on the other wall on. I tried to attach the white wire coming out of the same cable as the black but when I flipped the switch, it popped and wouldn't work anymore. I hooked up another dimmer but this time connected the white wire that was in the same cable as the red but then I couldn't get the lights to turn on with the dimmer or the switch. I noticed the black wire that was in the same cable as the red was sitting in there with barely any of the wire stripped. It made me wonder if it may have broke and was some how connected to the old dimmer at one point. I can take pictures and get any other information needed. The dimmer is a Lutron TGCL-153PH-WH.
The good news -- you can do this.
Contrary to my previous version of the answer (which mixed up which switch was paired with which dimmer), the 3 wire cable between the RH dimmer in the top image and the LH switch in the bottom picture means that you can do this without pulling wire. Take the black from the 2 wire cable and connect it to the black screw on the dimmer. Then connect the red and capped off black from the 3 wire cable to the brass screws on the dimmer, and your 3 way switch should work properly. If it doesn't, post another question linked to this one with a photo of the light box.